How a file is deleted in ufs2?
Patrick Tracanelli
eksffa at freebsdbrasil.com.br
Mon Apr 10 18:11:03 UTC 2006
Eric Anderson wrote:
> Diego Woitasen wrote:
>
>> I want to know how a file is deleted in a ufs2 filesystem, specifically
>> what happen with the information in the inode. The information is
>> deleted to or the inode is marked as free but the information (uid, gid,
>> blocks, times, etc) remains there?
>>
>> I read the chapter 8 of 'Design and implementation of FreeBSD" and "a
>> Fast file system for Unix", but i can't see the answer.
>>
>> Reading the code is an interesting choice, but is the last resource :)
>
>
>
> I'm 100% certain here, but looking at the code, I don't think much
> happens besides freeing the inode and clearing it for re-use. The
> on-disk data remains.
>
>
> Eric
When the story ends, you have
char *f
unlink(f);
in the code. So reading "man 2 unlink" might be a good start point. If
reading McKusick's book and the syscall man page dont make it clear, you
will have no better choice other than reading the code yourself :D
--
Patrick Tracanelli
FreeBSD Brasil LTDA.
(31) 3281-9633 / 3281-3547
316601 at sip.freebsdbrasil.com.br
http://www.freebsdbrasil.com.br
"Long live Hanin Elias, Kim Deal!"
More information about the freebsd-fs
mailing list