diff mbox

xen-blkback: advertise indirect segment support earlier

Message ID 56BB2A8202000078000D07C8@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Feb. 10, 2016, 11:18 a.m. UTC
There's no reason to defer this until the connect phase, and in fact
there are frontend implementations expecting this to be available
earlier. Move it into the probe function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Bob Liu <bob.liu@oracle.com>
---
 drivers/block/xen-blkback/xenbus.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Comments

Roger Pau Monné Feb. 10, 2016, 12:27 p.m. UTC | #1
El 10/2/16 a les 12:18, Jan Beulich ha escrit:
> There's no reason to defer this until the connect phase, and in fact
> there are frontend implementations expecting this to be available
> earlier. Move it into the probe function.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Looks fine.

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

The same should be done for "feature-persistent" AFAICT.

Roger.
Konrad Rzeszutek Wilk Feb. 15, 2016, 5:39 p.m. UTC | #2
On Wed, Feb 10, 2016 at 01:27:08PM +0100, Roger Pau Monné wrote:
> El 10/2/16 a les 12:18, Jan Beulich ha escrit:
> > There's no reason to defer this until the connect phase, and in fact
> > there are frontend implementations expecting this to be available
> > earlier. Move it into the probe function.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Looks fine.
> 
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>

applied.
> 
> The same should be done for "feature-persistent" AFAICT.
> 
> Roger.
diff mbox

Patch

--- 4.5-rc3/drivers/block/xen-blkback/xenbus.c
+++ 4.5-rc3-xen-blkback-ind-descr-advertise/drivers/block/xen-blkback/xenbus.c
@@ -618,6 +618,14 @@  static int xen_blkbk_probe(struct xenbus
 		goto fail;
 	}
 
+	err = xenbus_printf(XBT_NIL, dev->nodename,
+			    "feature-max-indirect-segments", "%u",
+			    MAX_INDIRECT_SEGMENTS);
+	if (err)
+		dev_warn(&dev->dev,
+			 "writing %s/feature-max-indirect-segments (%d)",
+			 dev->nodename, err);
+
 	/* Multi-queue: advertise how many queues are supported by us.*/
 	err = xenbus_printf(XBT_NIL, dev->nodename,
 			    "multi-queue-max-queues", "%u", xenblk_max_queues);
@@ -849,11 +857,6 @@  again:
 				 dev->nodename);
 		goto abort;
 	}
-	err = xenbus_printf(xbt, dev->nodename, "feature-max-indirect-segments", "%u",
-			    MAX_INDIRECT_SEGMENTS);
-	if (err)
-		dev_warn(&dev->dev, "writing %s/feature-max-indirect-segments (%d)",
-			 dev->nodename, err);
 
 	err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu",
 			    (unsigned long long)vbd_sz(&be->blkif->vbd));