Re: [PATCH v2] iomap: add IOMAP_DIO_FSBLOCK_ALIGNED flag

Christoph Hellwig
2025-10-14T04:36:50Z

On Mon, Oct 13, 2025 at 07:35:16PM +1030, Qu Wenruo wrote:
> - Remove the btrfs part that utilize the new flag
> Now it's in the enablement patch of btrfs' bs > ps direct IO support.

I didn't really suggest removing it, but splitting it into a separate
patch in a two-patch series. We could probably even move everything
through the btrfs tree for 6.18 to get the fix in. It's just important
to keep infrastructure and user separate if you have to e.g. revert the
btrfs part for some reason, but we have another user in the meantime.
And I plan to use this for zoned XFS soon.

> + /*
> + * Align to the larger one of bdev and fs block size, to meet the
> + * alignment requirement of both layers.
> + */
> + if (dio->flags & IOMAP_DIO_FSBLOCK_ALIGNED)
> + alignment = max(alignment, fs_block_size);
> +

This looks much nicer, and thanks for the explanation!

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>