[Top] [All Lists]

Re: [PATCH 04/19] xfs: verify superblocks as they are read from disk

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 04/19] xfs: verify superblocks as they are read from disk
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 11 Oct 2012 17:41:39 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1349754670-32009-5-git-send-email-david@xxxxxxxxxxxxx>
References: <1349754670-32009-1-git-send-email-david@xxxxxxxxxxxxx> <1349754670-32009-5-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Oct 09, 2012 at 02:50:55PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> Add a superblock verify callback function and pass it into the
> buffer read functions. Remove the now redundant verification code
> that is currently in use.
> Adding verification shows that secondary superblocks never have
> their "sb_inprogress" flag cleared by mkfs.xfs, so when validating
> the secondary superblocks during a grow operation we have to avoid
> checking this field. Even if we fix mkfs, we will still have to
> ignore this field for verification purposes unless a version of mkfs
> that does not have this bug was used.

> @@ -304,9 +304,8 @@ STATIC int
>  xfs_mount_validate_sb(
>       xfs_mount_t     *mp,
>       xfs_sb_t        *sbp,
> -     int             flags)
> +     bool            check_inprogress)
>  {
> -     int             loud = !(flags & XFS_MFSI_QUIET);

I don't think removing this is a good idea.  The quiet flag is used
to silence all filesystem warnings when the kernel is blindly trying
all filesystem types when searching for the correct root fs type.

If we always print warnings here people will get annoying messages
when that happens for a non-XFS rootfs that we're asked to verify.

I'd rather make check_inprogress another flag here.

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