]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: zoned: suppress reclaim error message on EAGAIN
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 9 Aug 2021 04:32:30 +0000 (13:32 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:11 +0000 (13:19 +0200)
btrfs_relocate_chunk() can fail with -EAGAIN when e.g. send operations are
running. The message can fail btrfs/187 and it's unnecessary because we
anyway add it back to the reclaim list.

btrfs_reclaim_bgs_work()
`-> btrfs_relocate_chunk()
    `-> btrfs_relocate_block_group()
        `-> reloc_chunk_start()
            `-> if (fs_info->send_in_progress)
                `-> return -EAGAIN

CC: stable@vger.kernel.org # 5.13+
Fixes: 9d8d2570b3af ("btrfs: zoned: automatically reclaim zones")
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c

index d5421ee0d366abe035225c5a854519f7612e676c..a3b830b8410a80cf8e0d807864a9ca5d5b41ccea 100644 (file)
@@ -1561,7 +1561,7 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
                                div64_u64(zone_unusable * 100, bg->length));
                trace_btrfs_reclaim_block_group(bg);
                ret = btrfs_relocate_chunk(fs_info, bg->start);
-               if (ret)
+               if (ret && ret != -EAGAIN)
                        btrfs_err(fs_info, "error relocating chunk %llu",
                                  bg->start);