On Thu, Dec 12, 2024 at 10:05:47AM -0800, Darrick J. Wong wrote: > On Wed, Dec 11, 2024 at 09:53:43AM +0100, Christoph Hellwig wrote: > > This doesn't much - just always returns the start block number for each > > "This doesn't much" - I don't understand the sentence very well. How > about: > > "Add a new IOMAP_F_ZONE_APPEND flag for the filesystem to indicate that > the storage device must inform us where it wrote the data, so that the > filesystem can update its own internal mapping metadata. The filesystem > should set the starting address of the zone in iomap::addr, and extract > the LBA address from the bio during ioend processing. iomap builds > bios unconstrained by the hardware limits and will split them in the bio > submission handler." Sounds reasonable. > The splitting happens whenever IOMAP_F_BOUNDARY gets set by > ->map_blocks, right? The splitting happens when: (a) we run out of enough space in one zone and have to switch to another one. That then most likely picks an new zone, in which case IOMAP_F_BOUNDARY will be set (b) if the hardware I/O constraints require splitting the I/O (typically because it's too larger)