* [PATCH] hotplug: Restore block-tap phy compatibility
@ 2024-05-16 2:22 Jason Andryuk
2024-05-16 7:41 ` Jan Beulich
0 siblings, 1 reply; 6+ messages in thread
From: Jason Andryuk @ 2024-05-16 2:22 UTC (permalink / raw
To: xen-devel; +Cc: Jason Andryuk, Anthony PERARD
From: Jason Andryuk <jason.andryuk@amd.com>
From: Jason Andryuk <jason.andryuk@amd.com>
backendtype=phy using the blktap kernel module needs to use write_dev,
but tapback can't support that. tapback should perform better, but make
the script compatible with the old kernel module again.
Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
---
This is tested with tapback, but untested with phy/blkback since I don't
have the kernel module setup.
tools/hotplug/Linux/block-tap | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/tools/hotplug/Linux/block-tap b/tools/hotplug/Linux/block-tap
index 126e472786..8661ce77e3 100755
--- a/tools/hotplug/Linux/block-tap
+++ b/tools/hotplug/Linux/block-tap
@@ -20,9 +20,13 @@
#
# Disks should be specified using the following syntax:
#
+# For use with tapback (vbd3) (preferred):
# vdev=xvda,backendtype=tap,format=vhd,target=/srv/target.vhd
#
-# format is either "aio" (for raw files), or "vhd"
+# For use with blkback and the blktap2 kernel module:
+# script=block-tap,vdev=xvda,target=<type>:<file>
+#
+# format/<type> is either "aio" (for raw files), or "vhd"
dir=$(dirname "$0")
. "$dir/block-common.sh"
@@ -205,12 +209,17 @@ add()
xenstore_write "$XENBUS_PATH/pid" "$pid"
xenstore_write "$XENBUS_PATH/minor" "$minor"
- # dev, as a unix socket, would end up with major:minor 0:0 in
- # physical-device if write_dev were used. tapback would be thrown off by
- # that incorrect minor, so just skip writing physical-device.
- xenstore_write "$XENBUS_PATH/physical-device-path" "$dev"
- success
+ if [ "$XENBUS_TYPE" = "vbd3" ] ; then
+ # $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.
+ xenstore_write "$XENBUS_PATH/physical-device-path" "$dev"
+
+ success
+ else
+ write_dev "$dev"
+ fi
release_lock "block"
}
--
2.40.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] hotplug: Restore block-tap phy compatibility
2024-05-16 2:22 [PATCH] hotplug: Restore block-tap phy compatibility Jason Andryuk
@ 2024-05-16 7:41 ` Jan Beulich
2024-05-16 13:52 ` Jason Andryuk
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2024-05-16 7:41 UTC (permalink / raw
To: Jason Andryuk; +Cc: Jason Andryuk, Anthony PERARD, xen-devel
On 16.05.2024 04:22, Jason Andryuk wrote:
> From: Jason Andryuk <jason.andryuk@amd.com>
>
> From: Jason Andryuk <jason.andryuk@amd.com>
Two identical From: (also in another patch of yours, while in yet another one
you have two _different_ ones, when only one will survive into the eventual
commit anyway)?
> backendtype=phy using the blktap kernel module needs to use write_dev,
> but tapback can't support that. tapback should perform better, but make
> the script compatible with the old kernel module again.
>
> Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
Should there be a Fixes: tag here?
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hotplug: Restore block-tap phy compatibility
2024-05-16 7:41 ` Jan Beulich
@ 2024-05-16 13:52 ` Jason Andryuk
2024-06-19 12:07 ` [PATCH for-4.19] " Jan Beulich
0 siblings, 1 reply; 6+ messages in thread
From: Jason Andryuk @ 2024-05-16 13:52 UTC (permalink / raw
To: Jan Beulich, Jason Andryuk; +Cc: Anthony PERARD, xen-devel
On 2024-05-16 03:41, Jan Beulich wrote:
> On 16.05.2024 04:22, Jason Andryuk wrote:
>> From: Jason Andryuk <jason.andryuk@amd.com>
>>
>> From: Jason Andryuk <jason.andryuk@amd.com>
>
> Two identical From: (also in another patch of yours, while in yet another one
> you have two _different_ ones, when only one will survive into the eventual
> commit anyway)?
Sorry about that. Since I was sending from my gmail account, I thought
I needed explicit From: lines to ensure the authorship was listed w/
amd.com. I generated the patches with `git format-patch --from`, to get
the explicit From: lines, and then sent with `git send-email`. The
send-email step then inserted the additional lines. I guess it added
From amd.com since I had changed to that address in .gitconfig.
>> backendtype=phy using the blktap kernel module needs to use write_dev,
>> but tapback can't support that. tapback should perform better, but make
>> the script compatible with the old kernel module again.
>>
>> Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
>
> Should there be a Fixes: tag here?
That makes sense.
Fixes: 76a484193d ("hotplug: Update block-tap")
Thanks,
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH for-4.19] hotplug: Restore block-tap phy compatibility
2024-05-16 13:52 ` Jason Andryuk
@ 2024-06-19 12:07 ` Jan Beulich
2024-06-19 14:33 ` Anthony PERARD
0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2024-06-19 12:07 UTC (permalink / raw
To: Anthony PERARD, Oleksii Kurochko; +Cc: xen-devel, Jason Andryuk, Jason Andryuk
On 16.05.2024 15:52, Jason Andryuk wrote:
> On 2024-05-16 03:41, Jan Beulich wrote:
>> On 16.05.2024 04:22, Jason Andryuk wrote:
>>> From: Jason Andryuk <jason.andryuk@amd.com>
>>>
>>> From: Jason Andryuk <jason.andryuk@amd.com>
>>
>> Two identical From: (also in another patch of yours, while in yet another one
>> you have two _different_ ones, when only one will survive into the eventual
>> commit anyway)?
>
> Sorry about that. Since I was sending from my gmail account, I thought
> I needed explicit From: lines to ensure the authorship was listed w/
> amd.com. I generated the patches with `git format-patch --from`, to get
> the explicit From: lines, and then sent with `git send-email`. The
> send-email step then inserted the additional lines. I guess it added
> From amd.com since I had changed to that address in .gitconfig.
>
>>> backendtype=phy using the blktap kernel module needs to use write_dev,
>>> but tapback can't support that. tapback should perform better, but make
>>> the script compatible with the old kernel module again.
>>>
>>> Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
>>
>> Should there be a Fixes: tag here?
>
> That makes sense.
>
> Fixes: 76a484193d ("hotplug: Update block-tap")
Surely this wants going into 4.19? Thus - Anthony, Oleksii?
Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH for-4.19] hotplug: Restore block-tap phy compatibility
2024-06-19 12:07 ` [PATCH for-4.19] " Jan Beulich
@ 2024-06-19 14:33 ` Anthony PERARD
2024-06-20 9:49 ` Oleksii K.
0 siblings, 1 reply; 6+ messages in thread
From: Anthony PERARD @ 2024-06-19 14:33 UTC (permalink / raw
To: Jan Beulich
Cc: Anthony PERARD, Oleksii Kurochko, xen-devel, Jason Andryuk,
Jason Andryuk
On Wed, Jun 19, 2024 at 02:07:04PM +0200, Jan Beulich wrote:
> On 16.05.2024 15:52, Jason Andryuk wrote:
> > On 2024-05-16 03:41, Jan Beulich wrote:
> >> On 16.05.2024 04:22, Jason Andryuk wrote:
> >>> From: Jason Andryuk <jason.andryuk@amd.com>
> >>>
> >>> From: Jason Andryuk <jason.andryuk@amd.com>
> >>
> >> Two identical From: (also in another patch of yours, while in yet another one
> >> you have two _different_ ones, when only one will survive into the eventual
> >> commit anyway)?
> >
> > Sorry about that. Since I was sending from my gmail account, I thought
> > I needed explicit From: lines to ensure the authorship was listed w/
> > amd.com. I generated the patches with `git format-patch --from`, to get
> > the explicit From: lines, and then sent with `git send-email`. The
> > send-email step then inserted the additional lines. I guess it added
> > From amd.com since I had changed to that address in .gitconfig.
> >
> >>> backendtype=phy using the blktap kernel module needs to use write_dev,
> >>> but tapback can't support that. tapback should perform better, but make
> >>> the script compatible with the old kernel module again.
> >>>
> >>> Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
> >>
> >> Should there be a Fixes: tag here?
> >
> > That makes sense.
> >
> > Fixes: 76a484193d ("hotplug: Update block-tap")
>
> Surely this wants going into 4.19? Thus - Anthony, Oleksii?
Yes, I think so.
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH for-4.19] hotplug: Restore block-tap phy compatibility
2024-06-19 14:33 ` Anthony PERARD
@ 2024-06-20 9:49 ` Oleksii K.
0 siblings, 0 replies; 6+ messages in thread
From: Oleksii K. @ 2024-06-20 9:49 UTC (permalink / raw
To: Anthony PERARD, Jan Beulich
Cc: Anthony PERARD, xen-devel, Jason Andryuk, Jason Andryuk
On Wed, 2024-06-19 at 14:33 +0000, Anthony PERARD wrote:
> On Wed, Jun 19, 2024 at 02:07:04PM +0200, Jan Beulich wrote:
> > On 16.05.2024 15:52, Jason Andryuk wrote:
> > > On 2024-05-16 03:41, Jan Beulich wrote:
> > > > On 16.05.2024 04:22, Jason Andryuk wrote:
> > > > > From: Jason Andryuk <jason.andryuk@amd.com>
> > > > >
> > > > > From: Jason Andryuk <jason.andryuk@amd.com>
> > > >
> > > > Two identical From: (also in another patch of yours, while in
> > > > yet another one
> > > > you have two _different_ ones, when only one will survive into
> > > > the eventual
> > > > commit anyway)?
> > >
> > > Sorry about that. Since I was sending from my gmail account, I
> > > thought
> > > I needed explicit From: lines to ensure the authorship was listed
> > > w/
> > > amd.com. I generated the patches with `git format-patch --from`,
> > > to get
> > > the explicit From: lines, and then sent with `git send-email`.
> > > The
> > > send-email step then inserted the additional lines. I guess it
> > > added
> > > From amd.com since I had changed to that address in .gitconfig.
> > >
> > > > > backendtype=phy using the blktap kernel module needs to use
> > > > > write_dev,
> > > > > but tapback can't support that. tapback should perform
> > > > > better, but make
> > > > > the script compatible with the old kernel module again.
> > > > >
> > > > > Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
> > > >
> > > > Should there be a Fixes: tag here?
> > >
> > > That makes sense.
> > >
> > > Fixes: 76a484193d ("hotplug: Update block-tap")
> >
> > Surely this wants going into 4.19? Thus - Anthony, Oleksii?
>
> Yes, I think so.
>
> Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
~ Oleksii
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-20 9:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 2:22 [PATCH] hotplug: Restore block-tap phy compatibility Jason Andryuk
2024-05-16 7:41 ` Jan Beulich
2024-05-16 13:52 ` Jason Andryuk
2024-06-19 12:07 ` [PATCH for-4.19] " Jan Beulich
2024-06-19 14:33 ` Anthony PERARD
2024-06-20 9:49 ` Oleksii K.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).