From: David Masover <jedi@ninja.dynup.net>
To: reiserfs-list@namesys.com
Subject: Re: More on Hard Links (was A bold idea (Re: Carrying Attributes too Far))
Date: Sat, 06 Dec 2003 19:08:51 -0600 [thread overview]
Message-ID: <3FD27DA3.7030309@ninja.dynup.net> (raw)
In-Reply-To: <1569161060-BeMail@cr593174-a>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander G. M. Smith wrote:
>David Masover wrote on Fri, 05 Dec 2003 19:54:26 -0600:
>
>
>>>Incidentally, renaming files is a superset of the delete operation.
>>>Implement that first, and you have delete for free.
>>>
>>>
>>>
>>>
>>If only it was that easy. When you rename a folder, you don't usually
>>do a recursive rename of everything inside. When you delete a folder --
>>you don't, unless it's "rmdir". You recursively delete each file
>>inside, and it's that kind of operation that creates problems for hard
>>links to directories.
>>
>>
>
>Actually, renaming also is recursive. The obvious case is when you
>rename a file over an existing file (or directory), which implies the
>whole deletion mechanism is needed.
>
>
Most of the time, rename over an existing file needs only a single
deletion, and renaming over a directory is (last I checked) impossible
with standard tools without removing or renaming the directory first.
If I do
touch a
mkdir b
mv a b
It will move 'a' to a file inside of 'b', rather than removing 'b'.
This isn't necessarily the best way, but it's how it's done now -- to
get the effect you're implying, I'd have to do
rm -rf b
mv a b
>Also, at least for the AGMS link mechanism (or perhaps for any system
>that allows multiple parent directories), it has to do a graph traversal
>to find out which parent links are still valid, and which need to be
>adjusted if their parent has been changed. If you see the example at
>the bottom of http://web.ncf.ca/au829/BeOS/AGMSLinkExplanation.txt you'll
>notice that deleting something can cause a sweeping re-evaluation of who
>is the parent to what. The same thing would happen if you rename (move)
>a parent directory to be a subdirectory of one of its children.
>
>
>
Can we do that? Last I checked, the file utilities (or maybe the fs
itself) won't let you move a directory to a child of itself, or a child
of a child of itself. If this "graph traversal" is what I think it is,
it belongs in fsck, not normal fs operation. Of course, I don't have a
better solution, aside from either stretching the limits of reference
counts or dropping directory hardlinks altogether.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iQIVAwUBP9J9pwisZLIF6uqOAQKZhxAAnMQNtl9MMwVNNhbDKIBpT9PDKqwb1b0C
NfrgOBMyxlosTWT0OVrbS5deFoTefkpk6inzlcck9nCLDCB5CnOfKBlnA1MbWaPN
jHsmC5Cz0mVOk61hWUvWDWZ1DLrl4yb313KF/5XwTGyQ/0NZWTHEAgHf4FjX3wRq
ZkLubWGt7fdsRv+FWo1s5ah2sQPzPj/3nynECFVt1gQaGoNkaxETWj3a5bAjLWwX
9SZLDrhqPxPzKCFvs9OL9PH2MC7nlYa0rOEOKdKBdTsTMdEhEluZyTXVYAMmwlpM
d3UQj6tcg5ehRs7jHhsjKSD4nIzdmK8nKrBXi0j+anw/g8n+bHFbgsVCOwumv8WO
k1AxnGncgcdtkNSafUmNGYgtL5Ra0Fv0b2sIjggyHmZFes5OBr3Kgj93Mznk1z10
siiVA43NhBimHuZsdyZ1U64Sl5uV287iAgKqDPbvQ4Z24uV6X0b5/4vpRcDsm++U
05M1c/CwG9YLqVluzm0ewvq8px0zGrcPbkm6v86PL9UxIbN8aDKKqyaUv8lXHi7y
YiWwFingzlUIkyXV2yfdzRbXthdhXo17gX0NJBaiyS9jYl40DecuFH5w3bFxLhnj
ys9IOrM0Q2hSTzyD2GFyR8FoJQIypc95YwkeOBZbUjskyJy7xE2bX+269US9ursz
BA6EToDsPwg=
=aMts
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-12-07 1:08 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-04 5:58 Carrying Attributes too Far lrc1
2003-10-04 18:17 ` Alexander G. M. Smith
2003-10-04 20:10 ` Hubert Chan
2003-12-03 19:18 ` Hans Reiser
2003-12-05 0:30 ` lrc1
2003-12-05 3:58 ` A bold idea (Re: Carrying Attributes too Far) David Masover
2003-12-05 9:44 ` Heinz-Josef Claes
2003-12-05 14:00 ` David Masover
2003-12-05 16:37 ` Hubert Chan
2003-12-06 1:38 ` David Masover
2003-12-06 4:01 ` Hubert Chan
2003-12-06 17:40 ` David Masover
2003-12-06 22:41 ` lrc1
2003-12-07 1:18 ` carrying links too far? (was Re: A bold idea (Re: Carrying Attributes too Far)) David Masover
2003-12-07 2:26 ` Hubert Chan
2003-12-07 9:08 ` The danger of bad external links lrc1
2003-12-07 18:15 ` Hubert Chan
2003-12-07 13:18 ` carrying links too far? (was Re: A bold idea (Re: Carrying Attributes too Far)) lrc1
2003-12-07 16:17 ` David Masover
2003-12-07 18:25 ` Hubert Chan
2003-12-07 2:11 ` A bold idea (Re: Carrying Attributes too Far) Hubert Chan
2003-12-08 20:54 ` Boyd Waters
2003-12-09 8:03 ` Heinz-Josef Claes
2003-12-10 2:12 ` more about links (was Re: A bold idea (Re: Carrying Attributes too Far)) David Masover
2003-12-11 11:35 ` Heinz-Josef Claes
2003-12-05 13:16 ` More on Hard Links (was " Alexander G. M. Smith
2003-12-05 14:07 ` David Masover
2003-12-05 14:17 ` Nikita Danilov
2003-12-05 15:58 ` Hans Reiser
2003-12-05 16:18 ` Nikita Danilov
2003-12-06 1:50 ` Garbage collection for files (was Re: More on Hard Links (was A bold idea (Re: Carrying Attributes too Far))) David Masover
2003-12-07 3:27 ` Hans Reiser
2003-12-06 10:06 ` More on Hard Links (was A bold idea (Re: Carrying Attributes too Far)) Stewart Smith
2003-12-05 22:38 ` Alexander G. M. Smith
2003-12-06 1:54 ` David Masover
2003-12-06 15:31 ` Alexander G. M. Smith
2003-12-07 1:08 ` David Masover [this message]
2003-12-07 2:42 ` Alexander G. M. Smith
2003-12-09 5:21 ` More on Hard Links Narcoleptic Electron
2003-12-09 18:48 ` Hubert Chan
2003-12-09 19:52 ` Narcoleptic Electron
2003-12-09 21:31 ` Hubert Chan
2003-12-09 23:47 ` Narcoleptic Electron
2003-12-10 0:13 ` Narcoleptic Electron
2003-12-10 3:05 ` Hubert Chan
2004-01-22 21:15 ` Narcoleptic Electron
2003-12-10 2:53 ` Hubert Chan
2003-12-10 3:22 ` Religion and Hard Links (was Re: More on Hard Links) David Masover
2003-12-10 20:49 ` More on Hard Links Matt Stegman
2003-12-16 1:27 ` Hubert Chan
2003-12-10 2:44 ` David Masover
2003-12-05 5:27 ` Carrying Attributes too Far Hubert Chan
2003-12-05 12:38 ` Hans Reiser
2003-12-06 23:33 ` lrc1
2003-12-07 2:48 ` Hubert Chan
2003-12-07 17:08 ` Hans Reiser
[not found] ` <3FD0023D.5030500@ninja.dynup.net>
2003-12-07 6:37 ` Saved Re: A bold idea (Re: Carrying Attributes too Far) lrc1
2003-12-07 6:39 ` lrc1
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=3FD27DA3.7030309@ninja.dynup.net \
--to=jedi@ninja.dynup.net \
--cc=reiserfs-list@namesys.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.