diff mbox series

btrfs: zoned: drop no longer valid write pointer check

Message ID c3b77b1b1b0c33ad8e51d055b97dde3d1874669e.1697527349.git.naohiro.aota@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs: zoned: drop no longer valid write pointer check | expand

Commit Message

Naohiro Aota Oct. 17, 2023, 7:23 a.m. UTC
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")
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 fs/btrfs/zoned.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Johannes Thumshirn Oct. 17, 2023, 8:43 a.m. UTC | #1
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
David Sterba Oct. 17, 2023, 7:34 p.m. UTC | #2
On Tue, Oct 17, 2023 at 04:23:22PM +0900, Naohiro Aota wrote:
> 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")
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>

Added to misc-next, thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 3504ade30cb0..188378ca19c7 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -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",