• Christoph Hellwig's avatar
    btrfs: fix zoned handling in submit_uncompressed_range · 256b0cf9
    Christoph Hellwig authored
    For zoned file systems we need to use run_delalloc_zoned to submit
    writeback, as we need to write out partial allocations when running into
    zone active limits.
    
    submit_uncompressed_range currently always calls cow_file_range to
    allocate blocks and thus misses the active zone limits handling.  Fix
    this by passing the pages_dirty argument to run_delalloc_zoned and always
    using it from submit_uncompressed_range as it does the right thing for
    zoned and non-zoned file systems.
    
    To account for the fact that run_delalloc_zoned is now also used for
    non-zoned file systems rename it to run_delalloc_cow, and add comment
    describing it.
    
    Fixes: 42c01100 ("btrfs: zoned: introduce dedicated data write path for zoned filesystems")
    Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    256b0cf9
inode.c 313 KB