On Tue, Jan 12, 2021 at 02:24:09PM -0500, Josef Bacik wrote:
On 12/21/20 10:49 PM, Naohiro Aota wrote:
If more than one IO is issued for one file extent, these IO can be written
to separate regions on a device. Since we cannot map one file extent to
such a separate area, we need to follow the "one IO == one ordered extent"
rule.
The Normal buffered, uncompressed, not pre-allocated write path (used by
cow_file_range()) sometimes does not follow this rule. It can write a part
of an ordered extent when specified a region to write e.g., when its
called from fdatasync().
Introduces a dedicated (uncompressed buffered) data write path for ZONED
mode. This write path will CoW the region and write it at once.
Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx>
This means we'll write one page at a time, no coalescing of data
pages. I'm not the one with zoned devices in production, but it might
be worth fixing this in the future so you're not generating a billion
bio's for large sequential data areas.
Actually, it is already wrting multiple pages in one bio. We get a
delalloced range
that spans multiple pages from btrfs_run_delalloc_range() and write all the
pages with one bio in extent_write_locked_range().
Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
Thanks,
Josef