Message ID | 9a2e763258dd00074e682f3783ec2156afff8450.1623051748.git.johannes.thumshirn@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: remove unused btrfs_{set,clear}_pending_and_info macros | expand |
On Mon, Jun 07, 2021 at 04:42:49PM +0900, Johannes Thumshirn wrote: > Commit 5297199a8bca ("btrfs: remove inode number cache feature") removed > the last user, but forgot to remove the macros as well. Let's do that now. This is part of the pending actions API, it's a way how to do some whole filesystem change from an unsafe context. The bit is set and the rest is done inside transaction commit at the same time. I'm thinking if we're going to have such options, the free space tree would qualify but it's done in another way. The no-holes can be also technically switched on a mounted filesystem because the code handles both cases. So I'm not sure if we want to remove it without evaluation.
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index c601f6733576..c3a275519f06 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1464,30 +1464,6 @@ do { \ #define btrfs_clear_pending(info, opt) \ clear_bit(BTRFS_PENDING_##opt, &(info)->pending_changes) -/* - * Helpers for setting pending mount option changes. - * - * Expects corresponding macros - * BTRFS_PENDING_SET_ and CLEAR_ + short mount option name - */ -#define btrfs_set_pending_and_info(info, opt, fmt, args...) \ -do { \ - if (!btrfs_raw_test_opt((info)->mount_opt, opt)) { \ - btrfs_info((info), fmt, ##args); \ - btrfs_set_pending((info), SET_##opt); \ - btrfs_clear_pending((info), CLEAR_##opt); \ - } \ -} while(0) - -#define btrfs_clear_pending_and_info(info, opt, fmt, args...) \ -do { \ - if (btrfs_raw_test_opt((info)->mount_opt, opt)) { \ - btrfs_info((info), fmt, ##args); \ - btrfs_set_pending((info), CLEAR_##opt); \ - btrfs_clear_pending((info), SET_##opt); \ - } \ -} while(0) - /* * Inode flags */
Commit 5297199a8bca ("btrfs: remove inode number cache feature") removed the last user, but forgot to remove the macros as well. Let's do that now. Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> --- fs/btrfs/ctree.h | 24 ------------------------ 1 file changed, 24 deletions(-)