RE: rm a_large_file takes too long under linux-2.2.1 (also unSTOP able)

Alexander Viro (viro@math.psu.edu)
Wed, 10 Feb 1999 22:58:20 -0500 (EST)


On Thu, 11 Feb 1999, Mark Henson wrote:

>
>
> It has been my experience too that often the deleting of large files takes a
> long time & is uninterruptable - but not always.

Sure. If somebody keeps the file opened it is not freed on
unlink() - only when the last process closes it. unlink() by itself is
trivial - remove the link from directory, update times on directory inode
and change the link counter on victim's inode. BFD. It's freeing the inode
that is long. And it happens only when the last reference to inode
disappears. Opened file descriptor counts as such reference.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/