From: Kenn Humborg (kenn at domain bluetree.ie)
Date: Mon 22 Jul 2002 - 19:53:06 IST
> Quoting kevin lyda <kevin+dated+1027734126.560c2e at domain linux.ie>:
>
> > uh, i wouldn't. i was referring to the previous message which discussed
> > the idea of a symlink that referred to a 64 bit device id and the inode
> > of the file. i gave two examples of why it wouldn't work.
>
> If you want an example of such a "symlink" - loopback fs's. The
> original data
> is referred to by major:minor devno + inode. There is a static (64 byte?)
> buffer that gets filled with as much of the filename will fit,
> but I don't think
> it's used for anything except displaying to users. There's no protection
> against deleting the original file while it's still losetup'd or
> even mounted.
> Just don't reuse the inode before losetup -d.... or else.
AFAIK, the kernel won't let you do that. The refcount on
the inode will never go to zero as long as the loop device
has it open. The file can be unlinked from the filesystem
(as done by, say, rm), but it won't actually disappear off
disk until all references to the inode go to zero.
Exactly the same mechanism that lets you delete files that
are open, but keeps them around until all processes close
them.
Later,
Kenn
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:01 GMT