From 4bae788075107efcad1d95aeca9084e40477c6b0 Mon Sep 17 00:00:00 2001 From: Filipe Manana Date: Thu, 11 Mar 2021 14:31:12 +0000 Subject: btrfs: add and use helper to get lowest sequence number for the tree mod log There are two places outside the tree mod log module that extract the lowest sequence number of the tree mod log. These places end up duplicating code and open coding the logic and internal implementation details of the tree mod log. So add a helper to the tree mod log module and header that returns the lowest sequence number or 0 if there aren't any tree mod log users at the moment. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/tree-mod-log.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/btrfs/tree-mod-log.h') diff --git a/fs/btrfs/tree-mod-log.h b/fs/btrfs/tree-mod-log.h index e74eab720a28..12605d19621b 100644 --- a/fs/btrfs/tree-mod-log.h +++ b/fs/btrfs/tree-mod-log.h @@ -48,5 +48,6 @@ int btrfs_tree_mod_log_eb_copy(struct extent_buffer *dst, int btrfs_tree_mod_log_insert_move(struct extent_buffer *eb, int dst_slot, int src_slot, int nr_items); +u64 btrfs_tree_mod_log_lowest_seq(struct btrfs_fs_info *fs_info); #endif -- cgit v1.2.3