When the background reclaim of a block group fails, the error is logged
as just "error relocating chunk <start>". The reclaim worker retries
the group on its next pass, so a persistent failure shows up as the same
line every 30 seconds with nothing saying why: -ENOSPC from a
reservation, -EIO from a bad read, and -ETXTBSY from an active swapfile
all look alike, and telling them apart takes tracing the relocation
path.
Print the error code.
Assisted-by: Claude:claude-opus-5-5
}
if (ret) {
btrfs_dec_block_group_ro(bg);
- btrfs_err(fs_info, "error relocating chunk %llu",
- bg->start);
+ btrfs_err(fs_info, "error relocating chunk %llu: %d",
+ bg->start, ret);
used = 0;
reserved = 0;
spin_lock(&space_info->lock);