From: Zach Brown <zab@zabbo.net>
To: Arnd Hannemann <arnd@arndnet.de>
Cc: Hugo Mills <hugo@carfax.org.uk>,
nspmangalore@gmail.com, linux-btrfs@vger.kernel.org
Subject: Re: hard links
Date: Wed, 04 Apr 2012 16:57:11 -0400 [thread overview]
Message-ID: <4F7CB5A7.4000907@zabbo.net> (raw)
In-Reply-To: <4F7CAB3E.1050800@arndnet.de>
> My understanding is that the limit on the number of hardlinks to the same
> file stored in the same directory, is, because the names of the
> hardlinks are stored within the same inode. As such the number of hardlinks is
> naturally limited by the size of the inode (and dependent on the length
> of the filenames). Correct?
Correct enough :). Yes, there is a limited amount of space associated
with an inode that tracks hard links and the name of the link consumes
that space.
The details are a little different. The backrefs to a given inode are
stored in one item in the tree whose size is limited by the block size
of the leaves in the tree.
> It's not a big deal, but with my original posting I just tried to
> point out that btrfs fails an operation while the above constraint is
> not violated. The size needed to store the filename "a" is exactly
> the same as the size needed to store the filename "b". Therefore, I
> would assume the operation mv "a" "b" to just work.
Huh, indeed.
I'd hope that the current behaviour could be fixed. In flipping through
the code it certainly looks like it adds the new backref for the new
name before it unlinks the old name and removes the old backref.
- z
next prev parent reply other threads:[~2012-04-04 20:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 16:38 hard links Arnd Hannemann
2012-04-04 19:33 ` Shyam Prasad N
2012-04-04 19:39 ` Arnd Hannemann
2012-04-04 19:53 ` Hugo Mills
2012-04-04 20:12 ` Arnd Hannemann
2012-04-04 20:57 ` Zach Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-02-02 21:05 Slides from Ceph talk at linux.conf.au? Craig Dunwoody
2010-02-02 21:43 ` Sage Weil
2010-02-05 0:17 ` Hard links Chris Dunlop
2010-02-05 20:34 ` Sage Weil
2010-02-07 1:09 ` Chris Dunlop
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=4F7CB5A7.4000907@zabbo.net \
--to=zab@zabbo.net \
--cc=arnd@arndnet.de \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=nspmangalore@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.