]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: zoned: drop no longer valid write pointer check
authorNaohiro Aota <naohiro.aota@wdc.com>
Tue, 17 Oct 2023 07:23:22 +0000 (16:23 +0900)
committerDavid Sterba <dsterba@suse.com>
Fri, 3 Nov 2023 15:38:56 +0000 (16:38 +0100)
There is a check of the write pointer vs the zone size to reject an invalid
write pointer. However, as of now, we have RAID0/RAID10 on the zoned
mode, we can have a block group whose size is larger than the zone size.

As an equivalent check against the block group's zone_capacity is already
there, we can just drop this invalid check.

Fixes: 568220fa9657 ("btrfs: zoned: support RAID0/1/10 on top of raid stripe tree")
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c

index 3504ade30cb0c3426bcd64c0418b326f1d7a6153..188378ca19c7f67a1f2c519f0a90629a4107fb5d 100644 (file)
@@ -1661,13 +1661,6 @@ int btrfs_load_block_group_zone_info(struct btrfs_block_group *cache, bool new)
        }
 
 out:
-       if (cache->alloc_offset > fs_info->zone_size) {
-               btrfs_err(fs_info,
-                       "zoned: invalid write pointer %llu in block group %llu",
-                       cache->alloc_offset, cache->start);
-               ret = -EIO;
-       }
-
        if (cache->alloc_offset > cache->zone_capacity) {
                btrfs_err(fs_info,
 "zoned: invalid write pointer %llu (larger than zone capacity %llu) in block group %llu",