xfs
[Top] [All Lists]

Re: XFS File system in trouble

To: Roger Willcocks <roger@xxxxxxxxxxxxxxxx>
Subject: Re: XFS File system in trouble
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Sun, 16 Aug 2015 08:48:40 +1000
Cc: Eric Sandeen <sandeen@xxxxxxxxxxx>, Brian Foster <bfoster@xxxxxxxxxx>, Kris Rusocki <kszysiu@xxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, "Rhorer, Leslie" <Leslie.Rhorer@xxxxxxxxxx>, Leslie Rhorer <lrhorer@xxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <03EB8070-A6DA-4E55-ACF9-6E0153E84DA0@xxxxxxxxxxxxxxxx>
References: <55BE7C75.4060604@xxxxxxxxxxxx> <55C06F41.4030502@xxxxxxxxxxxx> <20150804224240.GU16638@dastard> <55C8006C.8070807@xxxxxxxxxxxx> <55CC375C.10902@xxxxxxxxxxxx> <20150814012635.GT3902@dastard> <55CE75CA.5070506@xxxxxxxxxxxx> <74DC7EBF-0029-4E5E-9D96-DF193E2BE83F@xxxxxxxxxxxxxxxx> <55CF8972.8020306@xxxxxxxxxxx> <03EB8070-A6DA-4E55-ACF9-6E0153E84DA0@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Aug 15, 2015 at 07:57:04PM +0100, Roger Willcocks wrote:
> 
> On 15 Aug 2015, at 19:48, Eric Sandeen <sandeen@xxxxxxxxxxx> wrote:
> 
> > On 8/15/15 7:28 AM, Roger Willcocks wrote:
> >> xfs_repair 3.2.1 runs cleanly.
> >> 
> >> xfs_repair 3.1.1 complains about a load of stuff, including:
> > 
> > I wouldn't expect v3.1.1 to work at all, because:
> > 
> > # db/xfs_db -V
> > xfs_db version 4.2.0-rc1
> > # db/xfs_db /mnt/test2/leslie/md0.img -c version
> > versionnum [0xbdb4+0x8a] = 
> > V4,NLINK,DIRV2,ATTR,ALIGN,DALIGN,LOGV2,EXTFLG,SECTOR,MOREBITS,ATTR2,LAZYSBCOUNT,PROJID32BIT
> > 
> > the filesystem has 32-bit project IDs, and:
> > 
> > # git log --oneline | grep -i "projid32bit"
> > dd536e1 xfsprogs: Note projid32bit default change in mkfs.xfs manpage
> > 22bc10e xfsprogs: projid32bit handling
> > 
> > # git describe --contains 22bc10e
> > v3.1.4~2
> > 
> > that feature support didn't show up until v3.1.4.  Were you running a stock 
> > v3.1.1?
> > 
> > Anyway, in my testing, up to v3.2.0, repair finds a lot of errors (and 
> > spends some
> > time looking for a proper superblock)
> > 
> > v3.2.1 finds no errors.
> > 
> 
> And thereâs the problem, (since XFS_SB_VERSION2_CRCBIT is not set)
>  xfs-repair-3.2.1 should spot and fix the v3 inode.
> 
> repair/dinode.c (tip) only checks for (line 2335 or so):
> 
>     (xfs_sb_version_hascrc(&mp->m_sb) && dino->di_version < 3)
> 
> not a non-crc filesystem with version >= 3.
> 
> Adding the missing check:
> 
>    || (! xfs_sb_version_hascrc(&mp->m_sb) && dino->di_version >= 3) 

Yup, that looks like the issue. Good spotting, Roger! Can you send a
patch w/ signoff that I can commit?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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