[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH] xen-block: fix reporting of discard feature
> -----Original Message----- > From: Roger Pau Monne <roger.pau@xxxxxxxxxx> > Sent: 18 January 2021 15:34 > To: qemu-devel@xxxxxxxxxx > Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>; Arthur Borsboom > <arthurborsboom@xxxxxxxxx>; Stefano > Stabellini <sstabellini@xxxxxxxxxx>; Anthony Perard > <anthony.perard@xxxxxxxxxx>; Paul Durrant > <paul@xxxxxxx>; Kevin Wolf <kwolf@xxxxxxxxxx>; Max Reitz <mreitz@xxxxxxxxxx>; > xen- > devel@xxxxxxxxxxxxxxxxxxxx; qemu-block@xxxxxxxxxx > Subject: [PATCH] xen-block: fix reporting of discard feature > > Linux blkfront expects both "discard-granularity" and > "discard-alignment" present on xenbus in order to properly enable the > feature, not exposing "discard-alignment" left some Linux blkfront > versions with a broken discard setup. This has also been addressed in > Linux with: > > https://lore.kernel.org/lkml/20210118151528.81668-1-roger.pau@xxxxxxxxxx/T/#u > > Fix QEMU to report a "discard-alignment" of 0, in order for it to work > with older Linux frontends. > > Reported-by: Arthur Borsboom <arthurborsboom@xxxxxxxxx> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Paul Durrant <paul@xxxxxxx> > --- > Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> > Cc: Anthony Perard <anthony.perard@xxxxxxxxxx> > Cc: Paul Durrant <paul@xxxxxxx> > Cc: Kevin Wolf <kwolf@xxxxxxxxxx> > Cc: Max Reitz <mreitz@xxxxxxxxxx> > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx > Cc: qemu-block@xxxxxxxxxx > --- > hw/block/xen-block.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c > index 718d886e5c..246d9c23a2 100644 > --- a/hw/block/xen-block.c > +++ b/hw/block/xen-block.c > @@ -253,6 +253,7 @@ static void xen_block_realize(XenDevice *xendev, Error > **errp) > xen_device_backend_printf(xendev, "feature-discard", "%u", 1); > xen_device_backend_printf(xendev, "discard-granularity", "%u", > conf->discard_granularity); > + xen_device_backend_printf(xendev, "discard-alignment", "%u", 0); > } > > xen_device_backend_printf(xendev, "feature-flush-cache", "%u", 1); > -- > 2.29.2
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |