public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Christian Brauner <[email protected]>, [email protected]
Cc: Jan Kara <[email protected]>, Christoph Hellwig <[email protected]>,
	Alexander Viro <[email protected]>,
	[email protected]
Subject: Re: [PATCH] [RFC]: fs: claw back a few FMODE_* bits
Date: Wed, 27 Mar 2024 11:19:06 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <20240327-begibt-wacht-b9b9f4d1145a@brauner>

On 3/27/24 10:45 AM, Christian Brauner wrote:
> There's a bunch of flags that are purely based on what the file
> operations support while also never being conditionally set or unset.
> IOW, they're not subject to change for individual file opens. Imho, such
> flags don't need to live in f_mode they might as well live in the fops
> structs itself. And the fops struct already has that lonely
> mmap_supported_flags member. We might as well turn that into a generic
> fops_flags member and move a few flags from FMODE_* space into FOP_*
> space. That gets us four FMODE_* bits back and the ability for new
> static flags that are about file ops to not have to live in FMODE_*
> space but in their own FOP_* space. It's not the most beautiful thing
> ever but it gets the job done. Yes, there'll be an additional pointer
> chase but hopefully that won't matter for these flags.

Not doing that extra dereference is kind of the point of the FMODE_*
flags, at least the ones that I care about. Probably not a huge deal for
these cases though, as we're generally going to call one of the f_op
handlers shortly anyway. The cases where we don't, at least for
io_uring, we already cache the state separately.

Hence more of a general observation than an objection to the patch. I do
like freeing up FMODE space, as it's (pretty) full.

-- 
Jens Axboe


  reply	other threads:[~2024-03-27 17:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 16:45 [PATCH] [RFC]: fs: claw back a few FMODE_* bits Christian Brauner
2024-03-27 17:19 ` Jens Axboe [this message]
2024-03-28  9:40   ` Christian Brauner
2024-03-28  1:18 ` Dave Chinner
2024-03-28  5:36   ` Christoph Hellwig
2024-03-28  8:06   ` Christian Brauner
2024-03-28  8:13     ` Christoph Hellwig
2024-03-28  9:41       ` Christian Brauner
2024-04-01 23:16     ` Dave Chinner
2024-03-28  5:35 ` Christoph Hellwig
2024-03-28  9:29   ` Christian Brauner

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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