public inbox for [email protected]
 help / color / mirror / Atom feed
From: Al Viro <[email protected]>
To: Christian Brauner <[email protected]>
Cc: [email protected], Jan Kara <[email protected]>,
	Christoph Hellwig <[email protected]>, Jens Axboe <[email protected]>,
	Dave Chinner <[email protected]>,
	[email protected]
Subject: Re: [PATCH v2] fs: claw back a few FMODE_* bits
Date: Sat, 6 Apr 2024 07:10:02 +0100	[thread overview]
Message-ID: <20240406061002.GZ538574@ZenIV> (raw)
In-Reply-To: <20240328-gewendet-spargel-aa60a030ef74@brauner>

On Thu, Mar 28, 2024 at 01:27:24PM +0100, 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 files. 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
> fop_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.
> 
> I suspect there's a few more we can move into there and that we can also
> redirect a bunch of new flag suggestions that follow this pattern into
> the fop_flags field instead of f_mode.

Looks sane; one suggestion, though - if we are going to try and free
bits, etc., it might be a good idea to use e.g.
#define FMODE_NOACCOUNT         ((__force fmode_t)BIT(29))
instead of hex constants.  IME it's easier to keep track of, especially
if we have comments between the definitions.

  parent reply	other threads:[~2024-04-06  6:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 12:27 [PATCH v2] fs: claw back a few FMODE_* bits Christian Brauner
2024-03-28 13:08 ` Christoph Hellwig
2024-04-02 10:51 ` Jan Kara
2024-04-02 12:59 ` Jens Axboe
2024-04-03 21:12 ` Mark Brown
2024-04-04  9:12   ` Jan Kara
2024-04-04 11:43     ` Mark Brown
2024-04-05 10:27       ` Christian Brauner
2024-04-05 11:12         ` Mark Brown
2024-04-04  0:18 ` Al Viro
2024-04-05 10:06   ` Christian Brauner
2024-04-06  6:10 ` Al Viro [this message]
2024-04-06  6:16   ` Al Viro
2024-04-09  9:12     ` 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 \
    --in-reply-to=20240406061002.GZ538574@ZenIV \
    [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