[lkml]   [1997]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectVFS/Posix question

I'm just doing some patches in the kernel for enabling omirr-support.
omirr (online mirror) will support *symmetric* online mirroring of filesystems
once it is available.

I have found the following curiosity: if open() is called with flags
O_CREAT | O_EXCL , is returns an error if the "file" already exists.
However, what is really implemented is to check whether some _inode_
with the given name already exists. If the name exists in the form of
a symlink pointing in turn to a non-existant name, it will be an error, too.
However, I would expect that the non-existing name should be created
instead (without returning an error), as is the case with leaving out the
O_EXCL bit.

I don't have access to the Posix standards. Could anyone clarify what
should be the correct behaviour?

-- Thomas

 \ /
  Last update: 2005-03-22 13:38    [W:0.015 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site