xfs
[Top] [All Lists]

Re: [PATCH 11/15] xfs: move v1 inode conversion to xfs_inode_from_disk

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 11/15] xfs: move v1 inode conversion to xfs_inode_from_disk
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 17 Feb 2016 19:30:00 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160217074821.GD19486@dastard>
References: <1455693652-3899-1-git-send-email-david@xxxxxxxxxxxxx> <1455693652-3899-12-git-send-email-david@xxxxxxxxxxxxx> <20160217073204.GB16363@xxxxxxxxxxxxx> <20160217074821.GD19486@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Feb 17, 2016 at 06:48:21PM +1100, Dave Chinner wrote:
> On Tue, Feb 16, 2016 at 11:32:04PM -0800, Christoph Hellwig wrote:
> > On Wed, Feb 17, 2016 at 06:20:48PM +1100, Dave Chinner wrote:
> > > +
> > > + sbversion |= XFS_SB_VERSION_NLINKBIT;
> > > + setlink_inode(id, be32_to_cpu(dip->di_nlink), type == DBM_DIR, 
> > > security);
> > > +
> > 
> > So we always convert to v2 inodes here.  Given that's it's xfs_check
> > it's only in-core so harmless, but a comment here might be useful.
> 
> Yeah, probably. I'll have to look at this a bit closer - I think I
> assumed that we're always going to have v2 inode format here (like
> we do in the kernel), but that may not be true. I'll have a closer
> look.

having a closer look, the XFS_SB_VERSION_NLINKBIT that is set here
in sbversion is never used, so I just removed it. I also changed it
back to using the converted in-memory link count so it's always
going to be correct now. Now it is just:

+       setlink_inode(id, xino.i_d.di_nlink, type == DBM_DIR, security);

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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