Re: [PATCH 31/41] fs: Provide functions for handling mapping_metadata_bhs directly

Jan Kara
2026-03-25T19:00:56Z

On Mon 23-03-26 22:51:24, Christoph Hellwig wrote:
> On Fri, Mar 20, 2026 at 02:41:26PM +0100, Jan Kara wrote:
> > As part of transition toward moving mapping_metadata_bhs to fs-private
> > part of the inode, provide functions for operations on this list
> > directly instead of going through the inode / mapping.
> >
> > Signed-off-by: Jan Kara <jack@suse.cz>
...
> > @@ -553,9 +547,8 @@ EXPORT_SYMBOL_GPL(mmb_has_buffers);
> > * buffer stays on our list until IO completes (at which point it can be
> > * reaped).
> > */
> > -int sync_mapping_buffers(struct address_space *mapping)
> > +int mmb_sync_buffers(struct mapping_metadata_bhs *mmb)
>
> mmb and buffers in the same name feels a bit redundant.
>
> mmc_sync_all? mapping_sync_buffers?

I've called this just mmb_sync() and I've also shortened
mmb_invalidate_buffers() to mmb_invalidate().

>
> > +int generic_mmb_fsync_noflush(struct file *file,
> > + struct mapping_metadata_bhs *mmb,
> > + loff_t start, loff_t end, bool datasync)
>
> mmb_fsync? mapping_buffers_fsync?

This I've called mmb_fsync().

Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR