Commit 22053022 authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba
Browse files

btrfs: move the folio ordered helpers from ctree.h into fs.h



The folio ordered helper macros are defined at ctree.h but this is not
the best place since ctree.{h,c} is all about the btree data structure
implementation and not a generic module. So move these macros into the
fs.h header.

Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent a5b3f117
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -756,12 +756,4 @@ static inline bool btrfs_is_data_reloc_root(const struct btrfs_root *root)
	return root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID;
}

/*
 * We use folio flag owner_2 to indicate there is an ordered extent with
 * unfinished IO.
 */
#define folio_test_ordered(folio)	folio_test_owner_2(folio)
#define folio_set_ordered(folio)	folio_set_owner_2(folio)
#define folio_clear_ordered(folio)	folio_clear_owner_2(folio)

#endif
+8 −0
Original line number Diff line number Diff line
@@ -1066,6 +1066,14 @@ static inline void btrfs_wake_unfinished_drop(struct btrfs_fs_info *fs_info)
	(unlikely(test_bit(BTRFS_FS_STATE_LOG_CLEANUP_ERROR,		\
			   &(fs_info)->fs_state)))

/*
 * We use folio flag owner_2 to indicate there is an ordered extent with
 * unfinished IO.
 */
#define folio_test_ordered(folio)	folio_test_owner_2(folio)
#define folio_set_ordered(folio)	folio_set_owner_2(folio)
#define folio_clear_ordered(folio)	folio_clear_owner_2(folio)

#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS

#define EXPORT_FOR_TESTS