lkml.org 
[lkml]   [2022]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [LSF/MM/BPF TOPIC] making O_TMPFILE more atomic
On Thu, 24 Feb 2022 at 06:33, Steve French <smfrench@gmail.com> wrote:
>
> Currently creating tmpfiles on Linux can be problematic because the
> tmpfile is not created and opened at the same time (vfs_tmpfile calls
> into the fs, then later vfs_open is called to open the tmpfile). For
> some filesystems it would be more natural to create and open the
> tmpfile as one operation (because the action of creating the file on
> some filesystems returns an open handle, so closing it then reopening
> it would cause the tmpfile to be deleted).
>
> I would like to discuss whether the function do_tmpfile (which creates
> and then opens the tmpfile) could have an option for a filesystem to
> do this as one operation which would allow it to be more atomic and
> allow it to work on a wider variety of filesystems.

A related thread:

https://lore.kernel.org/all/20201109100343.3958378-3-chirantan@chromium.org/#r

There was no conclusion in the end. Not sure how hacky it would be to
store the open file in the inode...

Thanks,
Miklos

\
 
 \ /
  Last update: 2022-05-03 20:53    [W:0.045 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site