The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nathan Scott <nathans@sgi.com>
To: David Malone <dwmalone@maths.tcd.ie>, linux-xfs@oss.sgi.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Directory link count wrapping on Linux/XFS/i386?
Date: Thu, 31 Mar 2005 12:25:38 +1000	[thread overview]
Message-ID: <20050331022538.GH867@frodo> (raw)
In-Reply-To: <20050331004258.GF867@frodo>

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

  reply	other threads:[~2005-03-31  2:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-30 19:43 Directory link count wrapping on Linux/XFS/i386? David Malone
2005-03-30 20:06 ` Andreas Dilger
2005-03-31  0:42   ` Nathan Scott
2005-03-31  2:25     ` Nathan Scott [this message]
2005-03-31  6:23 ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050331022538.GH867@frodo \
    --to=nathans@sgi.com \
    --cc=dwmalone@maths.tcd.ie \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox