linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Neil Schemenauer <nas@arctrix.com>, linux-btrfs@vger.kernel.org
Subject: Re: Btrfs st_nlink for directories
Date: Sat, 23 Jan 2010 19:33:36 -0500	[thread overview]
Message-ID: <20100124003336.GP23006@think> (raw)
In-Reply-To: <878wbomu24.fsf@linux.vnet.ibm.com>

On Sun, Jan 24, 2010 at 02:12:59AM +0530, Aneesh Kumar K. V wrote:
> On Fri, 22 Jan 2010 20:28:12 -0600, Neil Schemenauer <nas@arctrix.com> wrote:
> > Hi,
> > 
> > It looks like Btrfs does not follow Unix traditions for st_nlink
> > attribute of directories. It seems to be always one, no matter the
> > number of sub-directories.
> > 
> > Is this intentional? I couldn't find it discussed anywhere. I
> > gather the Mac OS HFS+ doesn't follow traditional st_nlink behavior
> > as well. The 'find' man page has this note:
> 
> I have sent patches with message-id
> 1264279089-14913-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com
> to the list. Let me know if they works for your

Thanks for taking a look at this Aneesh, but in btrfs we always have a
link count of one on directories.

It's a design decision so that we don't end up limited in the total
number of subdirs we can create.  reiser3 did something similar,
switching to 1 when the link count got high.  I think the other
filesystems may have added something along these lines as well by now.

Btrfs just leaves it at one all the time.

-chris


      reply	other threads:[~2010-01-24  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-23  2:28 Btrfs st_nlink for directories Neil Schemenauer
2010-01-23 20:42 ` Aneesh Kumar K. V
2010-01-24  0:33   ` Chris Mason [this message]

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=20100124003336.GP23006@think \
    --to=chris.mason@oracle.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nas@arctrix.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;
as well as URLs for NNTP newsgroup(s).