diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-05-27 02:31:34 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2022-05-27 02:31:34 +0200 |
commit | df5660cf63bbafb5a1250954b91d9ec26558536f (patch) | |
tree | 3bfddaf614c9ad7b3d6e7a888a45885c260f6697 /fs/xfs/xfs_message.h | |
parent | xfs: don't log every time we clear the log incompat flags (diff) | |
download | linux-df5660cf63bbafb5a1250954b91d9ec26558536f.tar.xz linux-df5660cf63bbafb5a1250954b91d9ec26558536f.zip |
xfs: implement per-mount warnings for scrub and shrink usage
Currently, we don't have a consistent story around logging when an
EXPERIMENTAL feature gets turned on at runtime -- online fsck and shrink
log a message once per day across all mounts, and the recently merged
LARP mode only ever does it once per insmod cycle or reboot.
Because EXPERIMENTAL tags are supposed to go away eventually, convert
the existing daily warnings into state flags that travel with the mount,
and warn once per mount. Making this an opstate flag means that we'll
be able to capture the experimental usage in the ftrace output too.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_message.h')
-rw-r--r-- | fs/xfs/xfs_message.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/xfs_message.h b/fs/xfs/xfs_message.h index 55ee464ab59f..cc323775a12c 100644 --- a/fs/xfs/xfs_message.h +++ b/fs/xfs/xfs_message.h @@ -75,6 +75,12 @@ do { \ #define xfs_debug_ratelimited(dev, fmt, ...) \ xfs_printk_ratelimited(xfs_debug, dev, fmt, ##__VA_ARGS__) +#define xfs_warn_mount(mp, warntag, fmt, ...) \ +do { \ + if (xfs_should_warn((mp), (warntag))) \ + xfs_warn((mp), (fmt), ##__VA_ARGS__); \ +} while (0) + #define xfs_warn_once(dev, fmt, ...) \ xfs_printk_once(xfs_warn, dev, fmt, ##__VA_ARGS__) #define xfs_notice_once(dev, fmt, ...) \ |