Skip to content

Commit 202865c

Browse files
Darrick J. Wongdchinner
authored andcommitted
xfs: warn about LARP once per mount
Since LARP is an experimental debug-only feature, we should try to warn about it being in use once per mount, not once per reboot. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent df5660c commit 202865c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

fs/xfs/xfs_log.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3910,8 +3910,8 @@ xfs_attr_use_log_assist(
39103910
if (error)
39113911
goto drop_incompat;
39123912

3913-
xfs_warn_once(mp,
3914-
"EXPERIMENTAL logged extended attributes feature added. Use at your own risk!");
3913+
xfs_warn_mount(mp, XFS_OPSTATE_WARNED_LARP,
3914+
"EXPERIMENTAL logged extended attributes feature in use. Use at your own risk!");
39153915

39163916
return 0;
39173917
drop_incompat:

fs/xfs/xfs_mount.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ __XFS_HAS_FEAT(nouuid, NOUUID)
395395
#define XFS_OPSTATE_WARNED_SCRUB 7
396396
/* Kernel has logged a warning about shrink being used on this fs. */
397397
#define XFS_OPSTATE_WARNED_SHRINK 8
398+
/* Kernel has logged a warning about logged xattr updates being used. */
399+
#define XFS_OPSTATE_WARNED_LARP 9
398400

399401
#define __XFS_IS_OPSTATE(name, NAME) \
400402
static inline bool xfs_is_ ## name (struct xfs_mount *mp) \
@@ -433,7 +435,8 @@ xfs_should_warn(struct xfs_mount *mp, long nr)
433435
{ (1UL << XFS_OPSTATE_INODEGC_ENABLED), "inodegc" }, \
434436
{ (1UL << XFS_OPSTATE_BLOCKGC_ENABLED), "blockgc" }, \
435437
{ (1UL << XFS_OPSTATE_WARNED_SCRUB), "wscrub" }, \
436-
{ (1UL << XFS_OPSTATE_WARNED_SHRINK), "wshrink" }
438+
{ (1UL << XFS_OPSTATE_WARNED_SHRINK), "wshrink" }, \
439+
{ (1UL << XFS_OPSTATE_WARNED_LARP), "wlarp" }
437440

438441
/*
439442
* Max and min values for mount-option defined I/O

0 commit comments

Comments
 (0)