From: tytso@mit.edu
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: "J. R. Okajima" <hooanon05@yahoo.co.jp>,
linux-kernel@vger.kernel.org, stewb@linux-foundation.org
Subject: Re: [RFC 0/5] pathconf(3) with _PC_LINK_MAX
Date: Sun, 6 Dec 2009 16:39:30 -0500 [thread overview]
Message-ID: <20091206213930.GA10720@thunk.org> (raw)
In-Reply-To: <20091206083958.GC14381@ZenIV.linux.org.uk>
On Sun, Dec 06, 2009 at 08:39:58AM +0000, Al Viro wrote:
>
> Um... Why do we need that, again? Note that there is no way whatsoever
> for predicting whether link(2) will fail due to having too many existing
> links before you attempt the call - links can be created or removed between
> stat(2) and link(2). So any uses of that value are heuristical.
>
> Can you actually show any use cases of that thing? Preferably - in existing
> code, but even a theoretical one would be interesting.
I think it's mainly a "if we're going to implement a POSIX interface,
it would be nice if it returned something based on reality instead of
a wild-assed guess". :-)
The "real life" use case I could think of is that backup programs that
use hard links everywhere would be able to determine ahead of time in
advance when it might need to create a new file instead of using a
hard link, without needing to do the link and getting the EMLINK
error. I agree that the only way you can know for sure is by actually
trying the link, so it's a pretty feeble use case.
I will note that without a functional, ext3 and ext4 (or ext3
filesystem with dir_nlink file system feature mounted with ext4) file
systems would be indistinguishable.
- Ted
prev parent reply other threads:[~2009-12-06 21:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 7:58 [RFC 0/5] pathconf(3) with _PC_LINK_MAX J. R. Okajima
2009-12-06 7:58 ` [RFC 1/5] vfs, support " J. R. Okajima
2009-12-06 7:59 ` [RFC 2/5] ext2, " J. R. Okajima
2009-12-06 7:59 ` [RFC 3/5] ext3, " J. R. Okajima
2009-12-06 7:59 ` [RFC 4/5] nfs, " J. R. Okajima
2009-12-06 7:59 ` [RFC 5/5] tmpfs, " J. R. Okajima
2009-12-06 8:39 ` [RFC 0/5] " Al Viro
2009-12-06 9:09 ` hooanon05
2009-12-06 21:39 ` tytso [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=20091206213930.GA10720@thunk.org \
--to=tytso@mit.edu \
--cc=hooanon05@yahoo.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=stewb@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/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