All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: remove unused btrfs_{set,clear}_pending_and_info macros
@ 2021-06-07  7:42 Johannes Thumshirn
  2021-06-07 18:11 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2021-06-07  7:42 UTC (permalink / raw)
  To: David Sterba; +Cc: Johannes Thumshirn, linux-btrfs

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(-)

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
  */
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs: remove unused btrfs_{set,clear}_pending_and_info macros
  2021-06-07  7:42 [PATCH] btrfs: remove unused btrfs_{set,clear}_pending_and_info macros Johannes Thumshirn
@ 2021-06-07 18:11 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2021-06-07 18:11 UTC (permalink / raw)
  To: Johannes Thumshirn; +Cc: David Sterba, linux-btrfs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-07 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  7:42 [PATCH] btrfs: remove unused btrfs_{set,clear}_pending_and_info macros Johannes Thumshirn
2021-06-07 18:11 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.