summaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkback
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2016-02-10 12:18:10 +0100
committerJens Axboe <axboe@fb.com>2016-03-03 22:45:53 +0100
commit5a7058450cbc8702f976d1f444974485c70cb525 (patch)
tree7a1eb1d38f696802a4af1eb69b2c513885931eaf /drivers/block/xen-blkback
parentxen-blkfront: rename indirect descriptor parameter (diff)
downloadlinux-5a7058450cbc8702f976d1f444974485c70cb525.tar.xz
linux-5a7058450cbc8702f976d1f444974485c70cb525.zip
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é <roger.pau@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Cc: Bob Liu <bob.liu@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block/xen-blkback')
-rw-r--r--drivers/block/xen-blkback/xenbus.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index 876763f7f13e..16e28ee880a4 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -618,6 +618,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);
@@ -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));