Files, unliking, access, oh my.

Michael ODonnell michael.odonnell at comcast.net
Tue Feb 19 15:31:40 EST 2013



>Can that space that the file takes up be overwritten during
>this interim?  Or does the OS hold the inode sacrosanct until
>both references AND processes are no longer making use of it?

Right - the OS's official record of a file's state is the
(in-memory copy of the) inode - the directory entries are
simply tags.  Once a file is opened the kernel's relationship
with that file is entirely via the inode and deletion of one
or all of the corresponding directory entries has no effect
on that relationship, which persists until the refcount goes to
zero, ie.  all procs that had it open have closed it.  Only then
will allocated disk space be released and eligible for reuse.
 


More information about the gnhlug-discuss mailing list