Subject: Re: FFS journal
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 07/22/2006 16:27:37
>> And what will happen if someone tries to create a .deleted file or
>> directory in such a filesystem? Right now that is an allowed file
>> or directory name.
> That's why I suggested that the magic name should be spelled ".."
> rather than ".deleted".
Is there any reason it has to have a "possible" name? I'd be tempted
to give it a name beginning with \0 - or no name at all; could we maybe
recycle inumber 1 for this purpose?
Altneratively...some time ago, I wrote code that allows me to mount an
FFS such that the directory that becomes the mount-point root is not
necessarily the root of the filesystem in the partition. For example,
if I have a parititon containing an all-in-one-partition NetBSD
install, I could mount just its /usr subtree somewhere.
This is relevant because there's no reason why we couldn't have a
journaling FFS set up such that the root of the on-disk filesystem
contains, say, directories "deleted" and "root", and then have
"deleted" used internally with "root" being the root of what you see
when it's mounted. No hacks to fsck_ffs required; all that changes is
the mount code, so that when mounted journaled, those two directories
are required and handled appropriately. Oh, and newfs_ffs should
probably be made capable of pre-creating those directories.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B