[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrVB_6V8nqKJ_moRN4VnV=pHRJen2iSLybAc39XbjyBFdg@mail.gmail.com>
Date: Sat, 30 Mar 2013 15:40:55 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Pavel Machek <pavel@....cz>
Cc: Jörn Engel <joern@...fs.org>,
Zach Brown <zab@...hat.com>,
"Myklebust, Trond" <Trond.Myklebust@...app.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Ric Wheeler <rwheeler@...hat.com>,
Linux FS Devel <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Chris L. Mason" <clmason@...ionio.com>,
Christoph Hellwig <hch@...radead.org>,
Alexander Viro <aviro@...hat.com>,
"Martin K. Petersen" <mkp@....net>, Hannes Reinecke <hare@...e.de>,
Joel Becker <jlbec@...lplan.org>
Subject: Re: New copyfile system call - discuss before LSF?
On Sat, Mar 30, 2013 at 12:49 PM, Pavel Machek <pavel@....cz> wrote:
> 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.
Isn't linking a deleted file back into the filesystem explicitly
forbidden? I'm pretty sure that linking from /proc/fd/whatever
doesn't work. (I've often wanted a flink system call that takes a
file descriptor and links it somewhere. If it came with an option to
control whether it would overwrite an existing file, even better.)
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists