> Quoting kevin lyda <kevin+dated+1027734126.560c2e at 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
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!