All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs: Rename mapping private members
Date: Mon, 20 Nov 2023 17:44:34 -0800	[thread overview]
Message-ID: <20231121014434.GA36168@frogsfrogsfrogs> (raw)
In-Reply-To: <ZVfljIc64nEw0ewn@casper.infradead.org>

On Fri, Nov 17, 2023 at 10:13:32PM +0000, Matthew Wilcox wrote:
> On Fri, Nov 17, 2023 at 02:04:37PM -0800, Darrick J. Wong wrote:
> > On Fri, Nov 17, 2023 at 09:58:23PM +0000, Matthew Wilcox (Oracle) wrote:
> > > It is hard to find where mapping->private_lock, mapping->private_list and
> > > mapping->private_data are used, due to private_XXX being a relatively
> > > common name for variables and structure members in the kernel.  To fit
> > > with other members of struct address_space, rename them all to have an
> > > i_ prefix.  Tested with an allmodconfig build.
> > 
> > /me wonders if the prefix ought to be "as_" for address space instead of
> > inode.  Even though inode begat address_space, they're not the same
> > anymore.
> 
> It'd be the first thing in fs.h to ase an as_ prefix.  Right now, we
> have i_pages, i_mmap_writable, i_mmap, i_mmap_rwsem.  We have a_ops
> (which differs from f_op, i_op, s_op, dq_op, s_qcop in being plural!).
> Everything else doesn't have anything close to a meaningful prefix --
> host, invalidate_lock, gfp_mask, nr_thps, nrpages, writeback_index,
> flags, wb_err.
> 
> So i_ was the most common prefix, but if we wanted to go with a different
> prefix, we could go with a_.  Maybe we'll rename a_ops to a_op at
> some point.

<shrug> address_space::i_private_{data,lock,list} is fine with me.

Acked-by: Darrick J. Wong <djwong@kernel.org>

--D

  parent reply	other threads:[~2023-11-21  1:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-17 21:58 [PATCH] fs: Rename mapping private members Matthew Wilcox (Oracle)
2023-11-17 22:04 ` Darrick J. Wong
2023-11-17 22:13   ` Matthew Wilcox
2023-11-17 23:26     ` Al Viro
2023-11-20 15:10       ` Christian Brauner
2023-11-20 15:13     ` Christian Brauner
2023-11-21  1:44     ` Darrick J. Wong [this message]
2023-11-20 17:01 ` Josef Bacik
2023-11-21 11:03 ` 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=20231121014434.GA36168@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.