mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Horst Birthelmer <horst@birthelmer.de>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: Horst Birthelmer <hbirthelmer@googlemail.com>,
	 Miklos Szeredi <miklos@szeredi.hu>,
	Bernd Schubert <bschubert@ddn.com>,
	linux-kernel@vger.kernel.org,  linux-fsdevel@vger.kernel.org,
	Horst Birthelmer <hbirthelmer@ddn.com>
Subject: Re: Re: [PATCH RFC v2 2/2] fuse: add an implementation of open+getattr
Date: Wed, 7 Jan 2026 10:03:53 +0100	[thread overview]
Message-ID: <aV4g3dMyVcCzrI5Q@fedora.fritz.box> (raw)
In-Reply-To: <CAJnrk1bCenZHzPSrdjxzUMY4ekKhtAJ74Dg1QhUs77A1qEDu3A@mail.gmail.com>

On Tue, Jan 06, 2026 at 05:46:09PM -0800, Joanne Koong wrote:
> On Tue, Dec 23, 2025 at 2:13 PM Horst Birthelmer
> <hbirthelmer@googlemail.com> wrote:
> >
> > +       open_args.opcode = opcode;
> > +       open_args.nodeid = nodeid;
> > +       open_args.in_numargs = 1;
> > +       open_args.in_args[0].size = sizeof(open_in);
> > +       open_args.in_args[0].value = &open_in;
> > +       open_args.out_numargs = 1;
> > +       open_args.out_args[0].size = sizeof(struct fuse_open_out);
> > +       open_args.out_args[0].value = outopenp;
> > +
> > +       err = fuse_compound_add(compound, &open_args);
> > +       if (err)
> > +               goto out;
> > +
> > +       /* Add GETATTR */
> > +       getattr_args.opcode = FUSE_GETATTR;
> > +       getattr_args.nodeid = nodeid;
> > +       getattr_args.in_numargs = 1;
> > +       getattr_args.in_args[0].size = sizeof(getattr_in);
> > +       getattr_args.in_args[0].value = &getattr_in;
> > +       getattr_args.out_numargs = 1;
> > +       getattr_args.out_args[0].size = sizeof(struct fuse_attr_out);
> > +       getattr_args.out_args[0].value = outattrp;
> 
> I think things end up looking cleaner here (and above for the open
> args) if the arg initialization logic gets abstracted into helper
> functions, as fuse_do_getattr() and fuse_send_open() have pretty much
> the exact same logic.
> 
> Thanks,
> Joanne
> 
You are completely right.
Will change that in the next version,

Thanks,
Horst

  reply	other threads:[~2026-01-07  9:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 22:13 [PATCH RFC v2 0/2] fuse: compound commands Horst Birthelmer
2025-12-23 22:13 ` [PATCH RFC v2 1/2] fuse: add compound command to combine multiple requests Horst Birthelmer
2026-01-07  1:40   ` Joanne Koong
2026-01-07  9:29     ` Horst Birthelmer
2026-01-08  1:41       ` Joanne Koong
2026-01-07 14:03     ` Horst Birthelmer
2026-01-08  1:42       ` Joanne Koong
2025-12-23 22:13 ` [PATCH RFC v2 2/2] fuse: add an implementation of open+getattr Horst Birthelmer
2026-01-07  1:46   ` Joanne Koong
2026-01-07  9:03     ` Horst Birthelmer [this message]
2025-12-29  6:03 ` [PATCH RFC v2 0/2] fuse: compound commands Jingbo Xu
2025-12-29 12:27   ` Bernd Schubert
2025-12-30  8:36   ` Horst Birthelmer
2025-12-30 11:58     ` Jingbo Xu

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=aV4g3dMyVcCzrI5Q@fedora.fritz.box \
    --to=horst@birthelmer.de \
    --cc=bschubert@ddn.com \
    --cc=hbirthelmer@ddn.com \
    --cc=hbirthelmer@googlemail.com \
    --cc=joannelkoong@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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

all inboxes | Powered by JetHome®