On Thu, 2 Jun 2005 13:11:05 +0400, Nikita Danilov <[EMAIL PROTECTED]> said:
> Hans Reiser writes: >> What about if we have it that only the first name a directory is >> created with counts towards its reference count, and that if the >> directory is moved if it is moved from its first name, the new name >> becomes the one that counts towards the reference count? A bit of a >> hack, but would work. > This means that list of names has to be kept together with every > object (to find out where "true" reference has to be moved). And this > makes rename of directory problematic, as lists of names of all > directory children have to be updated. Don't you just need to keep a pointer (inode number) to the parent directory? When you move a file, check if the parent inode number is equal to the file's 'true parent' inode number, and if so, update the 'true parent' pointer. And do a similar thing when you delete. -- Hubert Chan <[EMAIL PROTECTED]> - http://www.uhoreg.ca/ PGP/GnuPG key: 1024D/124B61FA Fingerprint: 96C5 012F 5F74 A5F7 1FF7 5291 AF29 C719 124B 61FA Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.