xfs
[Top] [All Lists]

Re: Directory link count wrapping on Linux/XFS/i386?

To: David Malone <dwmalone@xxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
Subject: Re: Directory link count wrapping on Linux/XFS/i386?
From: Nathan Scott <nathans@xxxxxxx>
Date: Thu, 31 Mar 2005 12:25:38 +1000
Cc: linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <20050331004258.GF867@frodo>
References: <200503302043.aa27223@salmon.maths.tcd.ie> <20050330200601.GG1753@schnapps.adilger.int> <20050331004258.GF867@frodo>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.3i
On Thu, Mar 31, 2005 at 10:42:58AM +1000, Nathan Scott wrote:
> On Wed, Mar 30, 2005 at 01:06:01PM -0700, Andreas Dilger wrote:
> > The correct fix, used for reiserfs (and a patch for ext3 also) is to
> > set i_nlink = 1 in case the filesystem count has wrapped.  When nlink==1
> > the fts/find code no longer optimizes subdirectory traversal and checks
> > each entries filetype to see if it should recurse.
> 
> Ah, I see - the INC_DIR_INODE_NLINK/DEC_DIR_INODE_NLINK macros, right.
> I'll look into that too, thanks.

Hmm, since struct inode has an unsigned int as nlink, it'd
seem doing this sort of thing is only useful for filesystems
where the ondisk nlink is a 16 bit value (and ext2/3/reiserfs
do seem to be in that category, afaict).

So, Davids patch (and those one/two other cases) would seem
to be enough to get this resolved.  There isn't much using
nlink_t - looks like mainly the non-stat64 'stat' calls and
one or two other (possibly accidental?) uses like we had in
XFS.

cheers.

-- 
Nathan


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