xfs
[Top] [All Lists]

[PATCH 12/12] xfs: don't emit v5 superblock warnings on write

To: xfs@xxxxxxxxxxx
Subject: [PATCH 12/12] xfs: don't emit v5 superblock warnings on write
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 7 Jun 2013 22:25:01 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1370607901-11538-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx> <1370607901-11538-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

We write the superblock every 30s or so which results in the
verifier being called. Right now that results in this output
every 30s:

XFS (vda): Version 5 superblock detected. This kernel has EXPERIMENTAL support 
enabled!
Use of these features in this kernel is at your own risk!

And spamming the logs.

We don't need to check for whether we support v5 superblocks or
whether there are feature bits we don't support set as these are
only relevant when we first mount the filesytem. i.e. on superblock
read. Hence for the write verification we can just skip all the
checks (and hence verbose output) altogether.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 libxfs/xfs_mount.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libxfs/xfs_mount.c b/libxfs/xfs_mount.c
index e7e7445..db3785d 100644
--- a/libxfs/xfs_mount.c
+++ b/libxfs/xfs_mount.c
@@ -120,7 +120,8 @@ STATIC int
 xfs_mount_validate_sb(
        xfs_mount_t     *mp,
        xfs_sb_t        *sbp,
-       bool            check_inprogress)
+       bool            check_inprogress,
+       bool            check_version)
 {
 
        /*
@@ -145,7 +146,7 @@ xfs_mount_validate_sb(
         * Version 5 superblock feature mask validation. Reject combinations the
         * kernel cannot support up front before checking anything else.
         */
-       if (check_inprogress && XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) {
+       if (check_version && XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) {
                xfs_alert(mp,
 "Version 5 superblock detected. xfsprogs has EXPERIMENTAL support enabled!\n"
 "Use of these features is at your own risk!");
@@ -370,7 +371,7 @@ xfs_sb_to_disk(
 static int
 xfs_sb_verify(
        struct xfs_buf  *bp,
-       bool            verbose)
+       bool            check_version)
 {
        struct xfs_mount *mp = bp->b_target->bt_mount;
        struct xfs_sb   sb;
@@ -381,8 +382,8 @@ xfs_sb_verify(
         * Only check the in progress field for the primary superblock as
         * mkfs.xfs doesn't clear it from secondary superblocks.
         */
-       return xfs_mount_validate_sb(mp, &sb,
-                                    verbose && bp->b_bn == XFS_SB_DADDR);
+       return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR,
+                                    check_version);
 }
 
 /*
-- 
1.7.10.4

<Prev in Thread] Current Thread [Next in Thread>