Skip to contentSkip to conversation

common: dm-error now supports zoned devices

PATCH In review Christoph Hellwig 2 participants 4 messages Feb 21, 2024 – Feb 29, 2024 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: dm-error now supports zoned devices

Since kernel commit a951104333bd ("dm error: Add support for zoned block devices") dm-error fully supports zoned devices. Make use of that to also run error injection tests for zoned device.

---
 common/rc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
common/rc +1 -3
index 524ffa02a..f207d8ab2 100644
@@ -2193,12 +2193,10 @@ _require_dm_target()
 		_notrun "This test requires dm $target support"
 	fi
 
-	# dm-error cannot handle the zone information
-	#
 	# dm-snapshot and dm-thin-pool cannot ensure sequential writes on
 	# the backing device
 	case $target in
-	error|snapshot|thin-pool)
+	snapshot|thin-pool)
 		_require_non_zoned_device ${SCRATCH_DEV}
 		;;
 	esac
Signature · 1 line
2.39.2
#1 lore raw
Quoted 14 lines · Christoph Hellwig

Since kernel commit a951104333bd ("dm error: Add support for zoned block devices") dm-error fully supports zoned devices. Make use of that to also run error injection tests for zoned device.

---
 common/rc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
common/rc +0 -0
index 524ffa02a..f207d8ab2 100644

common/rc _require_dm_target() · line 2199

Quoted 10 lines
common/rc +1 -3
@@ -2193,12 +2193,10 @@ _require_dm_target()
 		_notrun "This test requires dm $target support"
 	fi
 
-	# dm-error cannot handle the zone information
-	#
 	# dm-snapshot and dm-thin-pool cannot ensure sequential writes on
 	# the backing device
 	case $target in
-	error|snapshot|thin-pool)
+	snapshot|thin-pool)

This patch makes sense to me, but I think this patch might cause failures on old kernel which doesn't has kernel commit a951104333bd, right?

Is there a simple way to check if dm-error supports zoned block device? If there's not, I think we have to let it fails on old kernel, to make it run on newer kernel.

Thanks,
Zorro

Quoted 6 lines
common/rc +0 -0
 		_require_non_zoned_device ${SCRATCH_DEV}
 		;;
 	esac
Signature · 1 line
2.39.2
#2 lore raw
Quoted 6 lines · Zorro Lang

This patch makes sense to me, but I think this patch might cause failures on old kernel which doesn't has kernel commit a951104333bd, right?

Is there a simple way to check if dm-error supports zoned block device? If there's not, I think we have to let it fails on old kernel, to make it run on newer kernel.

I don't know any way. But as this just affects zoned devices on btrfs for now I guess the usual parties can just make sure it works by backporting the right patches. The previous don't work wasn't even a not supported, but a case of dm-error being buggy for zoned devices.

In other words the original exclusion in xfstests should have never gone in and whoever put it there should have fixed dm-error instead.

Reviewed-by
#3 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 6 lines · Zorro Lang

This patch makes sense to me, but I think this patch might cause failures on old kernel which doesn't has kernel commit a951104333bd, right?

Is there a simple way to check if dm-error supports zoned block device? If there's not, I think we have to let it fails on old kernel, to make it run on newer kernel.

Quoted 7 lines

I don't know any way. But as this just affects zoned devices on btrfs for now I guess the usual parties can just make sure it works by backporting the right patches. The previous don't work wasn't even a not supported, but a case of dm-error being buggy for zoned devices.

In other words the original exclusion in xfstests should have never gone in and whoever put it there should have fixed dm-error instead.

OK, let's have this patch, and see the response from others :)

Quoted 1 line