mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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é <[email protected]> Signed-off-by: Jan Beulich <[email protected]> Cc: Bob Liu <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
This commit is contained in:
parent
14e710fe78
commit
5a7058450c
1 changed files with 8 additions and 5 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue