From: Miklos Szeredi <miklos@szeredi.hu>
To: Bernd Schubert <bernd.schubert@fastmail.fm>
Cc: Miklos Szeredi <mszeredi@redhat.com>,
linux-fsdevel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
Amir Goldstein <amir73il@gmail.com>,
David Howells <dhowells@redhat.com>,
Yu-li Lin <yulilin@google.com>,
Chirantan Ekbote <chirantan@chromium.org>
Subject: Re: [PATCH 8/8] fuse: implement ->tmpfile()
Date: Mon, 19 Sep 2022 08:30:26 +0200 [thread overview]
Message-ID: <CAJfpegtk8HPFfQegrs1fsPuC3hwHD2TXvGS7pQor=EoqMmtfng@mail.gmail.com> (raw)
In-Reply-To: <66d2c136-547a-3538-d015-c4ee0dcb2419@fastmail.fm>
On Fri, 16 Sept 2022 at 23:52, Bernd Schubert
<bernd.schubert@fastmail.fm> wrote:
>
>
>
> On 9/16/22 21:44, Miklos Szeredi wrote:
>
>
> > +static int fuse_tmpfile(struct user_namespace *mnt_userns, struct inode *dir,
> > + struct file *file, umode_t mode)
> > +{
> > + struct fuse_conn *fc = get_fuse_conn(dir);
> > + int err;
> > +
> > + if (fc->no_tmpfile)
> > + goto no_tmpfile;
> > +
> > + err = fuse_create_open(dir, file->f_path.dentry, file, file->f_flags, mode, FUSE_TMPFILE);
> > + if (err == -ENOSYS) {
> > + fc->no_tmpfile = 1;
> > +no_tmpfile:
> > + err = -EOPNOTSUPP;
> > + }
> > + return err;
> > +}
>
> A bit confusing part is that the other file systems are calling your new
> finish_tmpfile(), while fuse_create_open() calls finish_open() for
> tmpfiles as well. Seems to be identical but won't this easily miss
> possible changes done in the future to finish_tmpfile()?
There shouldn't be any such changes. It's really just a shorthand
form of finish_open().
Would calling it finish_open_simple() help? It really has nothing to
do with tmpfile and .atomic_open instances could call it as well.
Thanks,
Miklos
next prev parent reply other threads:[~2022-09-19 6:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 19:44 [PATCH 1/8] cachefiles: tmpfile error handling cleanup Miklos Szeredi
2022-09-16 19:44 ` [PATCH 2/8] vfs: add tmpfile_open() helper Miklos Szeredi
2022-09-16 19:44 ` [PATCH 3/8] cachefiles: use " Miklos Szeredi
2022-09-16 19:44 ` [PATCH 4/8] ovl: " Miklos Szeredi
2022-09-16 19:44 ` [PATCH 5/8] vfs: make vfs_tmpfile() static Miklos Szeredi
2022-09-16 19:44 ` [PATCH 6/8] vfs: move open right after ->tmpfile() Miklos Szeredi
2022-09-16 19:44 ` [PATCH 7/8] vfs: open inside ->tmpfile() Miklos Szeredi
2022-09-16 22:04 ` kernel test robot
2022-09-17 1:28 ` kernel test robot
2022-09-17 1:49 ` kernel test robot
2022-09-16 19:44 ` [PATCH 8/8] fuse: implement ->tmpfile() Miklos Szeredi
2022-09-16 21:52 ` Bernd Schubert
2022-09-19 6:30 ` Miklos Szeredi [this message]
2022-09-19 7:16 ` Bernd Schubert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJfpegtk8HPFfQegrs1fsPuC3hwHD2TXvGS7pQor=EoqMmtfng@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=amir73il@gmail.com \
--cc=bernd.schubert@fastmail.fm \
--cc=chirantan@chromium.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yulilin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).