xfs
[Top] [All Lists]

Re: Question about XFS recovery and error

To: Mike Gao <ygao.linux@xxxxxxxxx>
Subject: Re: Question about XFS recovery and error
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 20 Aug 2010 18:13:57 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <AANLkTi=prcC7ky3ikNTJ+py8XnALGf4THSOCUwqYhxaq@xxxxxxxxxxxxxx>
References: <AANLkTi=prcC7ky3ikNTJ+py8XnALGf4THSOCUwqYhxaq@xxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.24 (Macintosh/20100228)
Mike Gao wrote:
> The USB key is mounted automatically at boot and no error report with
> XFS recovery.
> But when I did a file copy on a USB key which XFS filesystem could be
> corrupted by some reason,
> I got endless repeat of ERROR message printed on the screen. 
> 
> Should XFS recovery this at the beginning when mounting? 
> 
> [42949387.250000] Starting XFS recovery on filesystem: sda (logdev:
> internal)
> [42949387.330000] Ending XFS recovery on filesystem: sda (logdev: internal)
> [42949388.600000] Starting XFS recovery on filesystem: sdb1 (logdev:
> internal)
> [42949388.640000] Ending XFS recovery on filesystem: sdb1 (logdev: internal)
> 

first off, the above is an indication that you're not cleanly unmounting
the filesystem.

> cp /mnt/USB0disk1/iCarly-4.ts ./iCarly-4-10.ts
> 
> [ 3234.740000] Filesystem "sda": XFS internal error
> xfs_btree_check_sblock at line 120 of file fs/xfs/xfs_btree.c.  Caller
> 0x8718e102
> [ 3234.740000]
> [ 3234.750000] regs can't be NULL.
> [ 3234.760000] Filesystem "sda": page discard on page 876a1914, inode
> 0x91, offset 91160576.
> [ 3235.150000] Filesystem "sda": XFS internal error
> xfs_btree_check_sblock at line 120 of file fs/xfs/xfs_btree.c.  Caller
> 0x8718e102

This is probably a result of a write cache which isn't properly flushed
during use prior to unplug (i.e. barriers; no idea what usb keys have
for write caches etc, but btree errors wouldn't be unheard of due to
lost/reordered writes due to write cache failure)

As to your other question, Michael is right, filesystems don't call out
to userspace repair tools when they encounter an error like this.

You could make xfs_repair run prior to mount, but I'd focus more on
why you're getting a corrupted filesystem in the first place.

-Eric

> Thanks,
> Mike
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

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