Re: [PATCH 16/15] xfs: only call xfs_setsize_buftarg once per buffer target

From: Darrick J. Wong
Date: Fri May 02 2025 - 12:44:55 EST


On Fri, May 02, 2025 at 08:57:26AM +0200, Christoph Hellwig wrote:
> On Thu, May 01, 2025 at 12:52:08PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@xxxxxxxxxx>
> >
> > It's silly to call xfs_setsize_buftarg from xfs_alloc_buftarg with the
> > block device LBA size because we don't need to ask the block layer to
> > validate a geometry number that it provided us. Instead, set the
> > preliminary bt_meta_sector* fields to the LBA size in preparation for
> > reading the primary super.
> >
> > It's ok to lose the sync_blockdev call at buftarg creation time for the
> > external log and rt devices because we don't read from them until after
> > calling xfs_setup_devices. We do need an explicit sync for the data
> > device because we read the primary super before calling
> > xfs_setup_devices.
>
> Should we just it for all of them in open_devices now that the sync
> is decoupled from setting the block size?

Yeah.

> Otherwise this looks good, but I guess this should go before the atomic
> writes series in the end?

Yep.

--D