hotplug: Restore block-tap phy compatibility (again)
PATCH 1/1 hotplug: Restore block-tap phy compatibility (again)
From: Jason Andryuk <[email protected]>
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each.
(dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the find_device case. The backendtype=tap case would need to be handled regardless.)
---
Tested with backendtype=tap & tapback and backendtype=phy & blktap module.
--- tools/hotplug/Linux/block-tap | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
tools/hotplug/Linux/block-tap +6 -3
@@ -204,13 +204,13 @@ add() tap_create fi - # Create nbd unix path. find_device/tap_create set pid & minor - dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) - xenstore_write "$XENBUS_PATH/pid" "$pid" xenstore_write "$XENBUS_PATH/minor" "$minor" if [ "$XENBUS_TYPE" = "vbd3" ] ; then + # Create nbd unix path. find_device/tap_create set pid & minor + dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) + # $dev, as a unix socket, has major:minor 0:0. If write_dev writes # physical-device, tapback would use that incorrect minor 0. So don't # write physical-device.
@@ -218,6 +218,9 @@ add() success else + # Construct dev path from minor + dev="/dev/xen/blktap-2/tapdev$minor" + [ -b "$dev" ] || fatal "blktap \"$dev\" is not a block dev" write_dev "$dev" fi
Signature · 1 line
2.40.1
Quoted 6 lines · Jason Andryuk
From: Jason Andryuk <[email protected]>
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each.
Quoted 8 lines
(dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the
find_devicecase. The backendtype=tap case would need to be handled regardless.)Fixes 6fcdc84927 ("hotplug: Restore block-tap phy compatibility")Fixes 76a484193d ("hotplug: Update block-tap")Signed-off-by Jason Andryuk <[email protected]>
Please don't forget to Cc Oleksii for anything you still want to go into 4.19 at this point.
Jan
Quoted 38 lines
---
Tested with backendtype=tap & tapback and backendtype=phy & blktap module.--- tools/hotplug/Linux/block-tap | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)tools/hotplug/Linux/block-tap +6
-3@@ -204,13 +204,13 @@ add() tap_create fi - # Create nbd unix path. find_device/tap_create set pid & minor - dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) - xenstore_write "$XENBUS_PATH/pid" "$pid" xenstore_write "$XENBUS_PATH/minor" "$minor" if [ "$XENBUS_TYPE" = "vbd3" ] ; then + # Create nbd unix path. find_device/tap_create set pid & minor + dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) + # $dev, as a unix socket, has major:minor 0:0. If write_dev writes # physical-device, tapback would use that incorrect minor 0. So don't # write physical-device.@@ -218,6 +218,9 @@ add() success else + # Construct dev path from minor + dev="/dev/xen/blktap-2/tapdev$minor" + [ -b "$dev" ] || fatal "blktap \"$dev\" is not a block dev" write_dev "$dev" fi
Quoted 9 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each.
(dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the
find_devicecase. The backendtype=tap case would need to be handled regardless.)Fixes 6fcdc84927 ("hotplug: Restore block-tap phy compatibility")
Do you mean f16ac12bd418 ("hotplug: Restore block-tap phy compatibility") ?
Quoted 3 lines
Fixes 76a484193d ("hotplug: Update block-tap")Signed-off-by Jason Andryuk <[email protected]>
With the fixes tag fix:
Quoted 3 lines
---
Tested with backendtype=tap & tapback and backendtype=phy & blktap module.
Thanks for the extra testing.
Cheers,
Signature · 5 lines
Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
Quoted 5 lines · Anthony PERARD
Quoted 4 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each.
Quoted 7 lines
Quoted 5 lines
(dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the
find_devicecase. The backendtype=tap case would need to be handled regardless.)Fixes 6fcdc84927 ("hotplug: Restore block-tap phy compatibility")Do you mean
f16ac12bd418("hotplug: Restore block-tap phy compatibility") ?
Yes! Thanks for checking that - I must have grabbed the hash from a local branch.
Quoted 6 lines
Quoted 3 lines
Fixes 76a484193d ("hotplug: Update block-tap")Signed-off-by Jason Andryuk <[email protected]>With the fixes tag fix:
Reviewed-by Anthony PERARD <[email protected]>
Thanks again.
Oleksii, this is a fix (for an incomplete fix) for 4.19. 76a484193d broke compatibility for block-tap with the blktap2 kernel model (when adding support for tapback). This finishes restoring blktap2 support.
I realize it's late in the release if you don't want to take it.
Regards,
Jason
Quoted 29 lines · Jason Andryuk
Quoted 12 lines · Anthony PERARD
Quoted 11 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be
handled properly for each.(dev could be captured during tap-ctl allocate for blktap module, but it
would not be set properly for thefind_devicecase. The backendtype=tap
case would need to be handled regardless.)Quoted 5 lines
Quoted 2 lines
Fixes 6fcdc84927 ("hotplug: Restore block-tap phycompatibility")
Do you mean
f16ac12bd418("hotplug: Restore block-tap phy compatibility") ?Yes! Thanks for checking that - I must have grabbed the hash from a local branch.
Quoted 6 lines
Quoted 3 lines
Fixes 76a484193d ("hotplug: Update block-tap")Signed-off-by Jason Andryuk <[email protected]>With the fixes tag fix:
Reviewed-by Anthony PERARD <[email protected]>
Quoted 8 lines
Thanks again.
Oleksii, this is a fix (for an incomplete fix) for 4.19.
76a484193dbroke compatibility for block-tap with the blktap2 kernel model (when adding support for tapback). This finishes restoring blktap2 support.I realize it's late in the release if you don't want to take it.
It's pretty late but I just wanted to clarify:
1. Is so critical that we should have this in 4.19?
2. If we won't take it now, then will it be backported anyway?
~ Oleksii
Quoted 33 lines · On 23/07/2024 6:31 pm, [email protected] wrote:
Quoted 32 lines · Jason Andryuk
Quoted 12 lines · Anthony PERARD
Quoted 11 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be
handled properly for each.(dev could be captured during tap-ctl allocate for blktap module, but it
would not be set properly for thefind_devicecase. The backendtype=tap
case would need to be handled regardless.)Quoted 4 lines
Quoted 2 lines
Fixes 6fcdc84927 ("hotplug: Restore block-tap phycompatibility")
Do you mean
f16ac12bd418("hotplug: Restore block-tap phy compatibility") ?Yes! Thanks for checking that - I must have grabbed the hash from a local branch.
Quoted 5 lines
Quoted 3 lines
Fixes 76a484193d ("hotplug: Update block-tap")Signed-off-by Jason Andryuk <[email protected]>With the fixes tag fix:
Reviewed-by Anthony PERARD <[email protected]>Thanks again.
Oleksii, this is a fix (for an incomplete fix) for 4.19.
76a484193dbroke compatibility for block-tap with the blktap2 kernel model (when adding support for tapback). This finishes restoring blktap2 support.
Quoted 4 lines
Quoted 1 line
I realize it's late in the release if you don't want to take it.
It's pretty late but I just wanted to clarify:
1. Is so critical that we should have this in 4.19?
2. If we won't take it now, then will it be backported anyway?
2) Yes it will get backported. In fact I'm about to commit it to staging.
1) It's a bug in a new feature for 4.19, so if we don't take this bugfix then we'll have to strip it from the release notes.
~Andrew
Quoted 35 lines · Andrew Cooper
Quoted 34 lines · On 23/07/2024 6:31 pm, [email protected] wrote:
Quoted 33 lines · Jason Andryuk
Quoted 12 lines · Anthony PERARD
Quoted 11 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be
handled properly for each.(dev could be captured during tap-ctl allocate for blktap module, but it
would not be set properly for thefind_devicecase. The backendtype=tap
case would need to be handled regardless.)Quoted 4 lines
Quoted 2 lines
Fixes 6fcdc84927 ("hotplug: Restore block-tap phycompatibility")
Do you mean
f16ac12bd418("hotplug: Restore block-tap phy compatibility") ?Yes! Thanks for checking that - I must have grabbed the hash from a local branch.
Quoted 5 lines
Quoted 3 lines
Fixes 76a484193d ("hotplug: Update block-tap")Signed-off-by Jason Andryuk <[email protected]>With the fixes tag fix:
Reviewed-by Anthony PERARD <[email protected]>Thanks again.
Oleksii, this is a fix (for an incomplete fix) for 4.19.
76a484193dbroke compatibility for block-tap with the blktap2 kernel model (when adding support for tapback). This finishes restoring blktap2 support.I realize it's late in the release if you don't want to take it.
Quoted 8 lines
Quoted 3 lines
It's pretty late but I just wanted to clarify:
1. Is so critical that we should have this in 4.19?
2. If we won't take it now, then will it be backported anyway?2) Yes it will get backported. In fact I'm about to commit it to staging.
1) It's a bug in a new feature for 4.19, so if we don't take this bugfix then we'll have to strip it from the release notes.
It's a bug in the old feature. The new feature - tapback daemon support, backendtype=tap - works with what's in the 4.19 tree. It's the old kernel module support - backendtype=phy,script=block-tap - that was broken when adding tapback support. This patch fixes the old support.
The change is localized in the block-tap script and requires explicit configuration (script=block-tap) to use. So it seems to me to be a lower risk to take it even though it is late in the cycle.
Regards,
Jason
Quoted 63 lines · Jason Andryuk
Quoted 47 lines · Andrew Cooper
Quoted 40 lines · On 23/07/2024 6:31 pm, [email protected] wrote:
Quoted 39 lines · Jason Andryuk
Quoted 16 lines · Anthony PERARD
Quoted 14 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as
backendtype=tap. Move the setting into the conditional, so it
can be
handled properly for each.(dev could be captured during tap-ctl allocate for blktap module,
but it
would not be set properly for thefind_devicecase. The backendtype=tap
case would need to be handled regardless.)Quoted 4 lines
Quoted 2 lines
Fixes 6fcdc84927 ("hotplug: Restore block-tap phycompatibility")
Do you mean
f16ac12bd418("hotplug: Restore block-tap phy compatibility") ?Yes! Thanks for checking that - I must have grabbed the hash from a
local branch.Quoted 5 lines
Quoted 3 lines
Fixes 76a484193d ("hotplug: Update block-tap")Signed-off-by Jason Andryuk <[email protected]>With the fixes tag fix:
Reviewed-by Anthony PERARD <[email protected]>Thanks again.
Oleksii, this is a fix (for an incomplete fix) for 4.19.
76a484193d
broke compatibility for block-tap with the blktap2 kernel model (when
adding support for tapback). This finishes restoring blktap2 support.Quoted 5 lines
Quoted 2 lines
I realize it's late in the release if you don't want to take it.
It's pretty late but I just wanted to clarify:
1. Is so critical that we should have this in 4.19?
2. If we won't take it now, then will it be backported anyway?Quoted 6 lines
2) Yes it will get backported. In fact I'm about to commit it to staging.
1) It's a bug in a new feature for 4.19, so if we don't take this bugfix
then we'll have to strip it from the release notes.It's a bug in the old feature. The new feature - tapback daemon support, backendtype=tap - works with what's in the 4.19 tree. It's the
old kernel module support - backendtype=phy,script=block-tap - that was
broken when adding tapback support. This patch fixes the old support.
Quoted 3 lines
The change is localized in the block-tap script and requires explicit configuration (script=block-tap) to use. So it seems to me to be a lower risk to take it even though it is late in the cycle.
Agree, if it is by default is disabled then I think we can have this patch in 4.19:
~ Oleksii
Quoted 9 lines · On Tue, Jul 23, 2024 at 07:31:58PM +0200, [email protected] wrote:
Quoted 6 lines · Jason Andryuk
Oleksii, this is a fix (for an incomplete fix) for 4.19.
76a484193dbroke compatibility for block-tap with the blktap2 kernel model (when adding support for tapback). This finishes restoring blktap2 support.I realize it's late in the release if you don't want to take it.
It's pretty late but I just wanted to clarify:
1. Is so critical that we should have this in 4.19?
I don't think it's critical enough to justify delaying the release. blktap2 is I think an out-of-tree kernel module so probably not very used.
We might want to at least put a note in "known issue" about blktap2 support by the "block-tap" script been broken.
Quoted 1 line
2. If we won't take it now, then will it be backported anyway?
Yes, we want to backport that as soon as 4.19 tree is open for backports, to have the fix in 4.19.1.
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
Quoted 11 lines · Anthony PERARD
Quoted 9 lines · On Tue, Jul 23, 2024 at 07:31:58PM +0200, [email protected] wrote:
Quoted 8 lines · Jason Andryuk
Oleksii, this is a fix (for an incomplete fix) for 4.19.
76a484193d
broke compatibility for block-tap with the blktap2 kernel model (when
adding support for tapback). This finishes restoring blktap2 support.I realize it's late in the release if you don't want to take it.
Quoted 8 lines
Quoted 2 lines
It's pretty late but I just wanted to clarify:
1. Is so critical that we should have this in 4.19?I don't think it's critical enough to justify delaying the release. blktap2 is I think an out-of-tree kernel module so probably not very used.
We might want to at least put a note in "known issue" about blktap2 support by the "block-tap" script been broken.
It was merged and I think it won't delay a release as this feature is disabled by default.
~ Oleksii
Quoted 8 lines
Quoted 2 lines
2. If we won't take it now, then will it be backported anyway?
Yes, we want to backport that as soon as 4.19 tree is open for backports, to have the fix in 4.19.1.
Cheers,
Quoted 5 lines · Anthony PERARD
Quoted 4 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each.
Quoted 7 lines
Quoted 5 lines
(dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the
find_devicecase. The backendtype=tap case would need to be handled regardless.)Fixes 6fcdc84927 ("hotplug: Restore block-tap phy compatibility")Do you mean
f16ac12bd418("hotplug: Restore block-tap phy compatibility") ?
Which, when replacing it, made noticeable that the above and ...
Quoted 1 line
Quoted 1 line
Fixes 76a484193d ("hotplug: Update block-tap")
... this hash also were too short. Please make sure you use 12 digits, as indicated by docs/process/sending-patches.pandoc.
Jan
Quoted 12 lines · Jan Beulich
Quoted 11 lines · Anthony PERARD
Quoted 9 lines · Jason Andryuk
"$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each.
(dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the
find_devicecase. The backendtype=tap case would need to be handled regardless.)Fixes 6fcdc84927 ("hotplug: Restore block-tap phy compatibility")
Quoted 8 lines
Quoted 1 line
Do you mean
f16ac12bd418("hotplug: Restore block-tap phy compatibility") ?Which, when replacing it, made noticeable that the above and ...
Quoted 1 line
Quoted 1 line
Fixes 76a484193d ("hotplug: Update block-tap")... this hash also were too short. Please make sure you use 12 digits, as indicated by docs/process/sending-patches.pandoc.
Sorry about that. I'll make sure to use 12 in the future. Thanks for catching and fixing up.
Regards,
Jason