On Dec 29, 2021, at 7:45 PM, Noel Chiappa <jnc(a)mercury.lcs.mit.edu> wrote:
From: Bakul Shah
My guess is *not* storing a path instead of a ptr
to the inode was done
to save on memory.
More probably speed; those old disks were not fast, and on a PDP-11, disk
caches were so small that converting the path to the current directory to its
in memory inode could take a bunch of disk reads.
Good point!
Every inode
has a linkcount so detecting when the last conn. is severed
not a problem.
Depends; if a directory _has_ to be empty before it can be deleted, maybe; but
if not, no. (Consider if /a/b/c/d exists, and /a/b is removed; the tree
underneath it has to be walked and the components deleted. That could take a
while...) In the general case (e.g. without the restriction to a tree), it's
basically the same problem as garbage collection in LISP.
Indeed. You can detect circularly linked nodes when you try to delete
sub directories. Then you have to ask the user whether to still delete it!
In Lisp you can simply NIL a node and let the GC take care of it.... May be
you can do the same with "rm -rf" but it may have a surprising/unintended
outcome! An important point I missed. Thanks.
Noel