Re: Safe File Update (atomic)
On Fri, 31 Dec 2010, Olaf van der Spek wrote:
> Ah, hehe. BTW, care to respond to the mail I send to you?
There is nothing more I can add to this thread. You want O_ATOMIC. It
cannot be implemented for all use cases of the POSIX API, so it will not
be implemented by the kernel. That's all there is to it, AFAIK.
You could ask for a new (non-POSIX?) API that does not ask of a
POSIX-like filesystem something it cannot provide (i.e. don't ask for
something that requires inode->path reverse mappings). You could ask
for syscalls to copy inodes, etc. You could ask for whatever is needed
to do a (open+write+close) that is atomic if the target already exists.
Maybe one of those has a better chance than O_ATOMIC.
It is up to you and the fs developers to find some common ground.
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot