lkml.org 
[lkml]   [2013]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: New copyfile system call - discuss before LSF?
    Hi!

    > > I thought the first thing people would ask for is to atomically create a
    > > new file and copy the old file into it (at least on local file systems).
    > > The idea is that nothing should see an empty destination file, either
    > > by race or by crash. (This feature would perhaps be described as a
    > > pony, but it should be implementable.)
    >
    > Having already wasted many week trying to implement your pony, I would
    > consider it about as possible as winning the lottery three times in a
    > row. It clearly is in theory and yet,...

    Hmm, really? AFAICT it would be simple to provide open_deleted_file("directory")
    syscall. You'd open_deleted_file(), copy source file into it, then
    fsync(), then link it into filesystem.

    That should have atomicity properties reflected.
    Pavel
    (who has too many (*)
    ponies around)
    (*) 1 is sometimes too many when we talk about big mammals.
    --
    (english) http://www.livejournal.com/~pavelmachek
    (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


    \
     
     \ /
      Last update: 2013-03-30 21:21    [W:2.384 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site