xfs: implement per-mount warnings for scrub and shrink usage
authorDarrick J. Wong <djwong@kernel.org>
Fri, 27 May 2022 00:31:34 +0000 (10:31 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 27 May 2022 00:31:34 +0000 (10:31 +1000)
commitdf5660cf63bbafb5a1250954b91d9ec26558536f
tree3bfddaf614c9ad7b3d6e7a888a45885c260f6697
parent374037966d661d62139a8b6fd33f42fc2038a1e6
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>
fs/xfs/scrub/scrub.c
fs/xfs/xfs_fsops.c
fs/xfs/xfs_message.h
fs/xfs/xfs_mount.h