On Tue, 30 Jun 2009 19:58:22 +0200, Jeremy Archer <j4rch3r at gmail.com> wrote:

>>>Let's suppose file is removed from the directory but is still open by
>>>some process...
>
> On a traditional fle system, you would not be able to delete an open file.
> Which I believe is good.

even in traditional file systems you can always remove/delete an open file,
zfs is no different here.

that is just a namespace operation and removes the file name from the namespace.

the process that has the file still open still can use it and its content.

only the last close will eventually remove the file and its content from disk.

process 1:

opteron.batschul./export/home/batschul.=> cat > xyz

process 2:

opteron.batschul./export/home/batschul.=> ls -la xyz
-rw-r--r--   1 batschul other          0 Jun 30 20:02 xyz

opteron.batschul./export/home/batschul.=> fuser xyz
xyz:     3432o -> process 1

now remove it

opteron.batschul./export/home/batschul.=> rm xyz
opteron.batschul./export/home/batschul.=> ls -la xyz
xyz: No such file or directory

this was UFS btw ;-)

---
frankB


Reply via email to