. and .. get blown away when directory size > 65536 UPORT286

Karl Lehenbauer karl at sugar.UUCP
Sun Jun 12 08:23:16 AEST 1988


I'm not exactly sure that this is what happened, but it appears that when
a directory reaches 65536 bytes in size under Microport System V/AT it
wraps around and the next two files created cause . and .. to get blown
away, trashing the directory.

The symptoms are:

The directory has an indicated size of 65536 bytes.
A cd to the directory and ls results in ". not found"
If one cd's to the directory above it and does an ls on the messed-up 
directory, one gets a message for every name in the directory that the file
is not found.
An rm -r of the directory causes it to print around 4096 file not found 
messages then refuses to delete the directory because it says there's 
still stuff in it.

I used fsdb to change the size of the directory to zero then let fsck trash
all the files.  I think it would be possible to trash a couple entries
in the directory then create valid . and .. files.  I don't know if the
kernel assumes they're the first two files.  It might be a good idea to
assume it does.

Please, no flames as to how hosed it is to have this many files.  It was an
accident, but one whose impact would have been significantly less had the
directory not been blown away by it.



More information about the Comp.unix.microport mailing list