aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/zoned.c
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2021-04-30 15:34:17 +0200
committerDavid Sterba <dsterba@suse.com>2021-06-21 15:19:04 +0200
commit47cdfb5e1dd60422ec2cbc53b667f73ff9a411dc (patch)
tree476152c75a1bf5839916c3ff0d32a79a4193a761 /fs/btrfs/zoned.c
parentbtrfs: handle preemptive delalloc flushing slightly differently (diff)
downloadlinux-dev-47cdfb5e1dd60422ec2cbc53b667f73ff9a411dc.tar.xz
linux-dev-47cdfb5e1dd60422ec2cbc53b667f73ff9a411dc.zip
btrfs: zoned: print message when zone sanity check type fails
This extends patch 784daf2b9628 ("btrfs: zoned: sanity check zone type"), the message was supposed to be there but was lost during merge. We want to make the error noticeable so add it. Fixes: 784daf2b9628 ("btrfs: zoned: sanity check zone type") CC: stable@vger.kernel.org # 5.12+ Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/zoned.c')
-rw-r--r--fs/btrfs/zoned.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index f1f3b10d1dbb..4f3bbba5815e 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -1140,6 +1140,10 @@ int btrfs_load_block_group_zone_info(struct btrfs_block_group *cache, bool new)
}
if (zone.type == BLK_ZONE_TYPE_CONVENTIONAL) {
+ btrfs_err_in_rcu(fs_info,
+ "zoned: unexpected conventional zone %llu on device %s (devid %llu)",
+ zone.start << SECTOR_SHIFT,
+ rcu_str_deref(device->name), device->devid);
ret = -EIO;
goto out;
}