What happens during an unlink(2)

jgy jgy at hropus.UUCP
Wed May 7 07:22:24 AEST 1986


Someone said:
> When you unlink a file, the disk block addresses in the inode are
> zeroed, not the actual data blocks. Zeroing the inode is tantamount to
> 'forgetting' where the data is actually stored. ..............

This is not true, all that is necessary is that the blocks be put on the
freelist, the inode marked unallocated and added to the inode freelist.
If this were the case you could just go and look at your unallocated inode
for the block information. The onus would be on the system to clear the
inode before being reused. The only possible dispute I can see with this
is (problems with a crash can be handled) that of who should be
"charged" with clearing of someone else's dirty inode!



More information about the Comp.unix.wizards mailing list