Skip to content

Commit

Permalink
Revert two commits breaking watching hotplug-status xenstore node
Browse files Browse the repository at this point in the history
This in short prevents the xen-netback waiting until hotplug script
completes. Revert until better fix is developed.
More details at https://lore.kernel.org/xen-devel/YKLnAcaVsMUQUC74@mail-itl/T/#t
  • Loading branch information
marmarek committed May 18, 2021
1 parent 85cc08d commit 14ccb95
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
46 changes: 46 additions & 0 deletions 0001-Revert-xen-netback-Check-for-hotplug-status-existenc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From f70ec711a4b6560a4bb669a6ddbade4f9735e634 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<[email protected]>
Date: Tue, 18 May 2021 03:07:13 +0200
Subject: [PATCH 1/2] Revert "xen-netback: Check for hotplug-status existence
before watching"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Invisible Things Lab
Cc: Marek Marczykowski-Górecki <[email protected]>

This reverts commit 2afeec08ab5c86ae21952151f726bfe184f6b23d.

Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
---
drivers/net/xen-netback/xenbus.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index d24b7a7993aa..a5439c130130 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -824,15 +824,11 @@ static void connect(struct backend_info *be)
xenvif_carrier_on(be->vif);

unregister_hotplug_status_watch(be);
- if (xenbus_exists(XBT_NIL, dev->nodename, "hotplug-status")) {
- err = xenbus_watch_pathfmt(dev, &be->hotplug_status_watch,
- NULL, hotplug_status_changed,
- "%s/%s", dev->nodename,
- "hotplug-status");
- if (err)
- goto err;
+ err = xenbus_watch_pathfmt(dev, &be->hotplug_status_watch, NULL,
+ hotplug_status_changed,
+ "%s/%s", dev->nodename, "hotplug-status");
+ if (!err)
be->have_hotplug_status_watch = 1;
- }

netif_tx_wake_all_queues(be->vif->dev);

--
2.26.3

42 changes: 42 additions & 0 deletions 0002-Revert-xen-netback-remove-hotplug-status-once-it-has.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From 6d9a10fb2b8c79d42af2e68f41263140e508a3b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<[email protected]>
Date: Tue, 18 May 2021 03:08:44 +0200
Subject: [PATCH 2/2] Revert "xen-netback: remove 'hotplug-status' once it has
served its purpose"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Invisible Things Lab
Cc: Marek Marczykowski-Górecki <[email protected]>

This reverts commit 1f2565780e9b7218cf92c7630130e82dcc0fe9c2.

Signed-off-by: Marek Marczykowski-Górecki <[email protected]>
---
drivers/net/xen-netback/xenbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index a5439c130130..f7b74e583c56 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -675,7 +675,6 @@ static void hotplug_status_changed(struct xenbus_watch *watch,

/* Not interested in this watch anymore. */
unregister_hotplug_status_watch(be);
- xenbus_rm(XBT_NIL, be->dev->nodename, "hotplug-status");
}
kfree(str);
}
@@ -987,6 +986,7 @@ static int netback_remove(struct xenbus_device *dev)
if (be->vif) {
kobject_uevent(&dev->dev.kobj, KOBJ_OFFLINE);
backend_disconnect(be);
+ xenbus_rm(XBT_NIL, dev->nodename, "hotplug-status");
xenvif_free(be->vif);
be->vif = NULL;
}
--
2.26.3

2 changes: 2 additions & 0 deletions kernel.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ Patch10: 0011-xen-blkfront-make-local-copy-of-response-before-usin.patch
Patch11: 0012-xen-blkfront-prepare-request-locally-only-then-put-i.patch
Patch12: 0013-xen-pcifront-pciback-Update-pciif.h-with-err-and-res.patch
Patch13: 0001-xen-gntdev-fix-gntdev_mmap-error-exit-path.patch
Patch14: 0001-Revert-xen-netback-Check-for-hotplug-status-existenc.patch
Patch15: 0002-Revert-xen-netback-remove-hotplug-status-once-it-has.patch

%description
Qubes Dom0 kernel.
Expand Down

0 comments on commit 14ccb95

Please sign in to comment.