Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!sri-spam!mordor!lll-tis!ptsfa!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!ccvaxa!aglew
From: aglew@ccvaxa.UUCP
Newsgroups: comp.unix.wizards
Subject: Re: stupidity in directory management?
Message-ID: <27300013@ccvaxa>
Date: Tue, 21-Jul-87 20:09:00 EDT
Article-I.D.: ccvaxa.27300013
Posted: Tue Jul 21 20:09:00 1987
Date-Received: Fri, 24-Jul-87 04:11:06 EDT
References: <603@nonvon.UUCP>
Lines: 32
Nf-ID: #R:nonvon.UUCP:603:ccvaxa:27300013:000:1464
Nf-From: ccvaxa.UUCP!aglew    Jul 21 19:09:00 1987


>|but to add a deleted bit. Deleted directory entries would be skipped
>|on search, and reused as necessary, but would have the inode number.
>|It might be nice to have an inode version number in the dir entry and
>|the inode, that is incremented whenever a new inode is allocated.
>|	Compression would be a bit of a problem - you would want to
>|leave a window between unlink and directory compression, so that
>|careless people like me might have a chance to unrm. Maybe done
>|by a daemon, or on demand.
>
>You don't need to modify the kernel to do this. You could rename the
>file to have an "invisible" prefix, like # or ... Of course, this way
>people tend to forget they are accumulating crud.
>
>	Ken

Not equivalent. Renaming to an invisible prefix leaves the file around;
the intent was to actually remove the file, so that the kernel can reuse
the blocks, but to leave enough information so that you can go and reconstruct
the file immediately after deletion.

Renaming to an invisible prefix WOULD be equivalent if, whenever the kernel
ran out of space on a filesystem, it would go and look for this files
beginning with this invisible prefix to delete. Ie. if the kernel could
invoke "find ... -name '...*' -exec rm {} \;" whenever it ran out of
space.

An insufficient-file-space-hook might be a good idea, especially on not-quite
standard UNIX files where compress options might be meaningful. Or on
contiguous filesystems.

aglew@mycroft.gould.com