From: Jan Beulich Date: Wed, 10 Feb 2016 11:18:10 +0000 (-0700) Subject: xen-blkback: advertise indirect segment support earlier X-Git-Tag: v4.1.12-92~158^2~4 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3e181b88c2663d3fee9c9ce23f7917daff56d6c4;p=users%2Fjedix%2Flinux-maple.git xen-blkback: advertise indirect segment support earlier 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. Acked-by: Roger Pau Monné Signed-off-by: Jan Beulich Cc: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk (cherry picked from commit 5a7058450cbc8702f976d1f444974485c70cb525) Signed-off-by: Konrad Rzeszutek Wilk OraBug: 23268939 --- diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index f9483c13efed1..26aa080e243cb 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c @@ -617,6 +617,14 @@ static int xen_blkbk_probe(struct xenbus_device *dev, 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); @@ -848,11 +856,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));