Skip to contentSkip to conversation

btrfs/294: reject zoned devices for now

PATCH In review Qu Wenruo 6 participants 9 messages Jul 24, 2023 – Jul 27, 2023 Btrfs file system

lore
Share & tools
lore

Qu Wenruo

author
#0 lore raw

PATCH 1/1 btrfs/294: reject zoned devices for now

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

---
 tests/btrfs/294 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tests/btrfs/294 +6 -2
index 61ce7d97..d7d13646 100755
@@ -16,11 +16,15 @@ _begin_fstest auto raid volume
 
 # Modify as appropriate.
 _supported_fs btrfs
+
+# No zoned support for RAID56 yet.
+_require_non_zoned_device "${SCRATCH_DEV}"
+
 _require_scratch_dev_pool 8
 _fixed_by_kernel_commit a7299a18a179 \
 	"btrfs: fix u32 overflows when left shifting @stripe_nr"
-_fixed_by_kernel_commit xxxxxxxxxxxx \
-	"btrfs: use a dedicated helper to convert stripe_nr to offset"
+_fixed_by_kernel_commit cb091225a538 \
+	"btrfs: fix remaining u32 overflows when left shifting stripe_nr"
 
 _scratch_dev_pool_get 8
 
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

---

Oh, good, you've sent this patch, ignore my reply to last patch. Looks good to me.

Thanks,
Zorro

Quoted 28 lines
 tests/btrfs/294 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tests/btrfs/294 +6 -2
index 61ce7d97..d7d13646 100755
@@ -16,11 +16,15 @@ _begin_fstest auto raid volume
 
 # Modify as appropriate.
 _supported_fs btrfs
+
+# No zoned support for RAID56 yet.
+_require_non_zoned_device "${SCRATCH_DEV}"
+
 _require_scratch_dev_pool 8
 _fixed_by_kernel_commit a7299a18a179 \
 	"btrfs: fix u32 overflows when left shifting @stripe_nr"
-_fixed_by_kernel_commit xxxxxxxxxxxx \
-	"btrfs: use a dedicated helper to convert stripe_nr to offset"
+_fixed_by_kernel_commit cb091225a538 \
+	"btrfs: fix remaining u32 overflows when left shifting stripe_nr"
 
 _scratch_dev_pool_get 8
 
Signature · 1 line
2.41.0
Reviewed-by
#2 lore raw
Quoted 10 lines · Zorro Lang
Quoted 9 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

Quoted 7 lines
Quoted 2 lines

---

Oh, good, you've sent this patch, ignore my reply to last patch. Looks good to me.

Thank you. I didn't notice the patch had been merged.

Quoted 33 lines

Thanks,
Zorro

Quoted 28 lines
 tests/btrfs/294 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tests/btrfs/294 +6 -2
index 61ce7d97..d7d13646 100755
@@ -16,11 +16,15 @@ _begin_fstest auto raid volume
 
 # Modify as appropriate.
 _supported_fs btrfs
+
+# No zoned support for RAID56 yet.
+_require_non_zoned_device "${SCRATCH_DEV}"
+
 _require_scratch_dev_pool 8
 _fixed_by_kernel_commit a7299a18a179 \
 	"btrfs: fix u32 overflows when left shifting @stripe_nr"
-_fixed_by_kernel_commit xxxxxxxxxxxx \
-	"btrfs: use a dedicated helper to convert stripe_nr to offset"
+_fixed_by_kernel_commit cb091225a538 \
+	"btrfs: fix remaining u32 overflows when left shifting stripe_nr"
 
 _scratch_dev_pool_get 8
 
Signature · 1 line
2.41.0
#3 lore raw
In reply to Qu Wenruo
Quoted 8 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

Hmm, instead of spreading these checks, shouldn't we check that the RAID level is supported, and have one single nob for that based off it, similar to _btrfs_get_profile_configs()?

#4 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

Quoted 7 lines
Quoted 2 lines

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

Hmm, instead of spreading these checks, shouldn't we check that the RAID level is supported, and have one single nob for that based off it, similar to _btrfs_get_profile_configs()?

That's beneficial. We need to declare which profile the test going to use, something like this?

_btrfs_require_profile raid5 raid6

or

_btrfs_require_profile data:dup

as the zoned mode cannot work with the DUP profile for data.

author
#5 lore raw
Quoted 19 lines · Naohiro Aota
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

Quoted 7 lines
Quoted 2 lines

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

Hmm, instead of spreading these checks, shouldn't we check that the RAID level is supported, and have one single nob for that based off it, similar to _btrfs_get_profile_configs()?

That's beneficial. We need to declare which profile the test going to use, something like this?

Quoted 7 lines

_btrfs_require_profile raid5 raid6

or

_btrfs_require_profile data:dup

as the zoned mode cannot work with the DUP profile for data.

The latter one sounds good, considering zoned support differs for data and metadata profiles.

Another thing is, do we have any sysfs files to indicate what profiles we support? For now we only have a "zoned" features, but no dedicated zoned specific sysfs files.

Would that be a good thing to consider?

Thanks,
Qu

#6 lore raw
Quoted 33 lines · Qu Wenruo
Quoted 19 lines · Naohiro Aota
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

Quoted 7 lines
Quoted 2 lines

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

Hmm, instead of spreading these checks, shouldn't we check that the RAID level is supported, and have one single nob for that based off it, similar to _btrfs_get_profile_configs()?

That's beneficial. We need to declare which profile the test going to use, something like this?

Quoted 7 lines

_btrfs_require_profile raid5 raid6

or

_btrfs_require_profile data:dup

as the zoned mode cannot work with the DUP profile for data.

The latter one sounds good, considering zoned support differs for data and metadata profiles.

Quoted 6 lines

Another thing is, do we have any sysfs files to indicate what profiles we support?
For now we only have a "zoned" features, but no dedicated zoned specific sysfs files.

Would that be a good thing to consider?

We don't have it but I think it's a good idea not just for testing, we export other information as the "features/supported_..." files. The profiles don't change often but with the incremental support for zoned this would make it easier for tests to keep up.

#7 lore raw
In reply to Qu Wenruo
Quoted 11 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

---

Just check before next fstests release. This patch has been reviewed, but looks like there're still more review points from btrfs list. So will you send a new version to replace this patch?

Thanks,
Zorro

Quoted 28 lines
 tests/btrfs/294 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tests/btrfs/294 +6 -2
index 61ce7d97..d7d13646 100755
@@ -16,11 +16,15 @@ _begin_fstest auto raid volume
 
 # Modify as appropriate.
 _supported_fs btrfs
+
+# No zoned support for RAID56 yet.
+_require_non_zoned_device "${SCRATCH_DEV}"
+
 _require_scratch_dev_pool 8
 _fixed_by_kernel_commit a7299a18a179 \
 	"btrfs: fix u32 overflows when left shifting @stripe_nr"
-_fixed_by_kernel_commit xxxxxxxxxxxx \
-	"btrfs: use a dedicated helper to convert stripe_nr to offset"
+_fixed_by_kernel_commit cb091225a538 \
+	"btrfs: fix remaining u32 overflows when left shifting stripe_nr"
 
 _scratch_dev_pool_get 8
 
Signature · 1 line
2.41.0
#8 lore raw
Quoted 10 lines · Zorro Lang
Quoted 9 lines · Qu Wenruo

The test case itself is utilizing RAID5/6, which is not yet supported on zoned device.

In the future we would use raid-stripe-tree (RST) feature, but for now just reject zoned devices completely.

And since we're here, also update the _fixed_by_kernel_commit lines, as the proper fix is already merged upstream.

Quoted 6 lines
Quoted 2 lines

---

Just check before next fstests release. This patch has been reviewed, but looks like there're still more review points from btrfs list. So will you send a new version to replace this patch?

IMHO the patch is fine to be merged for now.

The new comments are mostly a future work idea, which needs some time to develop and extra kernel features.

Thanks,
Qu

Quoted 33 lines

Thanks,
Zorro

Quoted 28 lines
  tests/btrfs/294 | 8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)
tests/btrfs/294 +6 -3
index 61ce7d97..d7d13646 100755
@@ -16,11 +16,15 @@ _begin_fstest auto raid volume
 
  # Modify as appropriate.
  _supported_fs btrfs
+
+# No zoned support for RAID56 yet.
+_require_non_zoned_device "${SCRATCH_DEV}"
+
  _require_scratch_dev_pool 8
  _fixed_by_kernel_commit a7299a18a179 \
  	"btrfs: fix u32 overflows when left shifting @stripe_nr"
-_fixed_by_kernel_commit xxxxxxxxxxxx \
-	"btrfs: use a dedicated helper to convert stripe_nr to offset"
+_fixed_by_kernel_commit cb091225a538 \
+	"btrfs: fix remaining u32 overflows when left shifting stripe_nr"
 
  _scratch_dev_pool_get 8
 
--

2.41.0