From: Gustav Munkby <grddev@gmail.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Christoph Hellwig <hch@lst.de>, Al Viro <viro@ZenIV.linux.org.uk>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] hfsplus: disable rename of directory hardlinks
Date: Tue, 03 May 2011 23:29:38 +0200 [thread overview]
Message-ID: <4DC073C2.2040609@gmail.com> (raw)
In-Reply-To: <DC0082BB-8670-446E-997C-D988E3E78A48@dilger.ca>
>> + /* Renaming directory hardlinks to could create loops.
>> + * Conservatively prevent any hardlink renaming.
>> + */
>
> It should also be safe to rename a directory hard link if the source and target parent directories are the same.
>
> This would allow the case of changing the directory name without moving it to another location.
Theoretically, yes. In fact, it seems the implementation on OS X is even more
liberal by alos allowing moves into other directories as long as the target is
not already beneath another hardlink.
However, for that to make sense, proper support for renaming hardlinks (files as
well as directories) must first be implemented. The way I understand the hfsplus
code both rename and unlink is currently broken for any type of hardlink,
because it operates on the link target rather than the link source. Hardlinks in
HFS+ are represented much like low-level soft links, with one target
file/directory in a private system directory, and several link sources.
Operating on the link target would invalidate all link sources on rename/unlink,
which is clearly not desired.
next prev parent reply other threads:[~2011-05-03 21:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 10:20 [PATCH] hfsplus: read support for directory hardlinks Gustav Munkby
2011-05-02 8:46 ` Christoph Hellwig
2011-05-02 12:40 ` Al Viro
2011-05-03 14:11 ` Gustav Munkby
2011-05-03 14:26 ` [PATCH] hfsplus: disable rename of " Gustav Munkby
2011-05-03 17:10 ` Andreas Dilger
2011-05-03 21:29 ` Gustav Munkby [this message]
2011-05-04 9:30 ` [PATCH] hfsplus: read support for " Christoph Hellwig
2011-05-04 15:04 ` Gustav Munkby
2011-05-19 11:09 ` Christoph Hellwig
2011-05-19 15:57 ` Gustav Munkby
2011-05-20 10:30 ` [PATCH v2] hfsplus: readonly " Gustav Munkby
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=4DC073C2.2040609@gmail.com \
--to=grddev@gmail.com \
--cc=adilger@dilger.ca \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.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 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.