aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-05-27 02:38:19 -0400
committerBen Myers <bpm@sgi.com>2013-06-14 16:58:47 -0400
commit47ad2fcba9ddd0630acccb13c71f19a818947751 (patch)
treee7d47535fd38fbe1bf97d83dc919f227e9495ab5 /fs
parent0a8aa1939777dd114479677f0044652c1fd72398 (diff)
xfs: don't emit v5 superblock warnings on write
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@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Ben Myers <bpm@sgi.com> (cherry picked from commit 34510185abeaa5be9b178a41c0a03d30aec3db7e)
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_mount.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index f6bfbd734669..e8e310c05097 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -314,7 +314,8 @@ STATIC int
314xfs_mount_validate_sb( 314xfs_mount_validate_sb(
315 xfs_mount_t *mp, 315 xfs_mount_t *mp,
316 xfs_sb_t *sbp, 316 xfs_sb_t *sbp,
317 bool check_inprogress) 317 bool check_inprogress,
318 bool check_version)
318{ 319{
319 320
320 /* 321 /*
@@ -337,9 +338,10 @@ xfs_mount_validate_sb(
337 338
338 /* 339 /*
339 * Version 5 superblock feature mask validation. Reject combinations the 340 * Version 5 superblock feature mask validation. Reject combinations the
340 * kernel cannot support up front before checking anything else. 341 * kernel cannot support up front before checking anything else. For
342 * write validation, we don't need to check feature masks.
341 */ 343 */
342 if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) { 344 if (check_version && XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) {
343 xfs_alert(mp, 345 xfs_alert(mp,
344"Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled!\n" 346"Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled!\n"
345"Use of these features in this kernel is at your own risk!"); 347"Use of these features in this kernel is at your own risk!");
@@ -675,7 +677,8 @@ xfs_sb_to_disk(
675 677
676static int 678static int
677xfs_sb_verify( 679xfs_sb_verify(
678 struct xfs_buf *bp) 680 struct xfs_buf *bp,
681 bool check_version)
679{ 682{
680 struct xfs_mount *mp = bp->b_target->bt_mount; 683 struct xfs_mount *mp = bp->b_target->bt_mount;
681 struct xfs_sb sb; 684 struct xfs_sb sb;
@@ -686,7 +689,8 @@ xfs_sb_verify(
686 * Only check the in progress field for the primary superblock as 689 * Only check the in progress field for the primary superblock as
687 * mkfs.xfs doesn't clear it from secondary superblocks. 690 * mkfs.xfs doesn't clear it from secondary superblocks.
688 */ 691 */
689 return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR); 692 return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR,
693 check_version);
690} 694}
691 695
692/* 696/*
@@ -719,7 +723,7 @@ xfs_sb_read_verify(
719 goto out_error; 723 goto out_error;
720 } 724 }
721 } 725 }
722 error = xfs_sb_verify(bp); 726 error = xfs_sb_verify(bp, true);
723 727
724out_error: 728out_error:
725 if (error) { 729 if (error) {
@@ -758,7 +762,7 @@ xfs_sb_write_verify(
758 struct xfs_buf_log_item *bip = bp->b_fspriv; 762 struct xfs_buf_log_item *bip = bp->b_fspriv;
759 int error; 763 int error;
760 764
761 error = xfs_sb_verify(bp); 765 error = xfs_sb_verify(bp, false);
762 if (error) { 766 if (error) {
763 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, bp->b_addr); 767 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, bp->b_addr);
764 xfs_buf_ioerror(bp, error); 768 xfs_buf_ioerror(bp, error);