xfs
[Top] [All Lists]

Re: Internal error xfs_sb_read_verify at line 726

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: Internal error xfs_sb_read_verify at line 726
From: Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx>
Date: Mon, 6 May 2013 20:30:20 +0200
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=simple; d=mail.ud10.udmedia.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=beta; bh=5ewoS0zuPj/KyHQOpMXzkXL1NY VR8AKQ3+BxF9fVd1Y=; b=sK4kG1VZW8VBvTmqiliRDbnuPSHO70tYL7eF97NFIr V52QiZPtrZhSuymqX5Xe/41LlvmWS0RWtWKeJSLPEviprHi7DzGlWm52FEAXSkWf +jpdNhqQU/NLmhv6xbC03OcmtcSsl/FQFQv/LuH9pqBWIEycPOfGX3iOBYYzlVZ2 U=
In-reply-to: <5187E290.8090109@xxxxxxxxxxx>
References: <20130506112717.GA502@x4> <5187E290.8090109@xxxxxxxxxxx>
On 2013.05.06 at 12:04 -0500, Eric Sandeen wrote:
> On 5/6/13 6:27 AM, Markus Trippelsdorf wrote:
> > Today I accidentally tried to mount my backup disk at /dev/sdc instead
> > of /dev/sdc1 and this is what happened:
> > 
> > ...
> > EXT4-fs (sdc): VFS: Can't find ext4 filesystem
> > FAT-fs (sdc): bogus number of reserved sectors
> > FAT-fs (sdc): Can't find a valid FAT filesystem
> > FAT-fs (sdc): bogus number of reserved sectors
> > FAT-fs (sdc): Can't find a valid FAT filesystem
> > ISOFS: Unable to identify CD-ROM format.
> > XFS (sdc): bad magic number
> > ffff8800db620000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > ................
> > ffff8800db620010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > ................
> > ffff8800db620020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > ................
> > ffff8800db620030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
> > ................
> > XFS (sdc): Internal error xfs_sb_read_verify at line 726 of file 
> > fs/xfs/xfs_mount.c.  Caller 0xffffffff8119e5cd
> 
> This seems to be a recent regression.
> 
> Comments above xfs_sb_quiet_read_verify() indicate that this behavior is
> to be avoided:
> 
>  * We may be probed for a filesystem match, so we may not want to emit
>  * messages when the superblock buffer is not actually an XFS superblock.
> 
> and it checks for proper magic prior to all the chattiness above int
> that function.
> 
> The superblock read is suposed to choose whether to be noisy or not,
> in xfs_readsb():
> 

The following patch fixes the issue for me:


diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index f6bfbd7..db8f27f 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -721,6 +721,11 @@ xfs_sb_read_verify(
        }
        error = xfs_sb_verify(bp);
 
+       if (error == XFS_ERROR(EWRONGFS)) {
+               xfs_buf_ioerror(bp, EWRONGFS);
+               return;
+       }
+
 out_error:
        if (error) {
                XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, 
bp->b_addr);

-- 
Markus

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