• Naohiro Aota's avatar
    btrfs: zoned: do not use async metadata checksum on zoned filesystems · 4eef29ef
    Naohiro Aota authored
    On zoned filesystems, btrfs uses per-fs zoned_meta_io_lock to serialize
    the metadata write IOs.
    
    Even with this serialization, write bios sent from btree_write_cache_pages
    can be reordered by async checksum workers as these workers are per CPU
    and not per zone.
    
    To preserve write bio ordering, we disable async metadata checksum on a
    zoned filesystem. This does not result in lower performance with HDDs as
    a single CPU core is fast enough to do checksum for a single zone write
    stream with the maximum possible bandwidth of the device. If multiple
    zones are being written simultaneously, HDD seek overhead lowers the
    achievable maximum bandwidth, resulting again in a per zone checksum
    serialization not affecting the performance.
    Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    4eef29ef
disk-io.c 135 KB