Re: [PATCH] fs: Rename mapping private members

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Um...  One obvious note: there is only one point in the cycle where such
renaming can be done - rc1.  And it has to be announced and agreed upon
in the previous cycle.

IMO we need to figure out a policy for that kind of stuff; I _think_
that ->d_subdirs/->d_child conversion I have in my tree does not
quite reach the threshold for that (relatively small footprint),
but the thing you are suggesting is almost certainly crosses it.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux