cvs commit: src/sys/kern vfs_syscalls.c

Joerg Sonnenberger joerg at britannica.bec.de
Wed Aug 17 15:42:25 PDT 2005


On Thu, Aug 18, 2005 at 12:10:03AM +0200, Simon 'corecode' Schubert wrote:
> (as a side note: all OS check for [vi]node == [vi]node, solaris checks 
> (in UFS) i_number == i_number)

Based on the assumption that the same inode gets mapped to the same
vnode, that's identical. Stackable filesystems don't trigger in here,
because they either count as separate namespace or handle the original
vnode down.

> This leaves us with:
> 1. There is no clear trend what to do.  I myself prefer "from" being 
> removed.

I can life with that, but it needs to be documented properly and it has
be to ensured that the behaviour is correct, as in the link count stays
above 1 under all circumstances.

> 2. We should do the check at the FS level.

Yes, I agree with that.

> I'm not sure how softdep would play into here.

If you rename the link twice to different directories, the following can
happen:
1/a -> 2/a -> 3/a

(all are links to the same file)

Now, can it happen that the directory entries for 1 and 2 are written to
disk before 3? Does the reference count of get updated in between? It's
a difficult question, I don't know.

Joerg





More information about the Commits mailing list