[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/11] xen-block: fix reporting of discard feature
From: |
Kevin Wolf |
Subject: |
[PULL 05/11] xen-block: fix reporting of discard feature |
Date: |
Mon, 15 Feb 2021 16:00:54 +0100 |
From: Roger Pau Monne <roger.pau@citrix.com>
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@citrix.com/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@gmail.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Message-Id: <20210118153330.82324-1-roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
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 0e7d66c2a7..a3b69e2709 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
- [PULL 00/11] Block layer patches, Kevin Wolf, 2021/02/15
- [PULL 04/11] hw/ide/ahci: map cmd_fis as DMA_DIRECTION_TO_DEVICE, Kevin Wolf, 2021/02/15
- [PULL 01/11] qemu-storage-daemon: Enable object-add, Kevin Wolf, 2021/02/15
- [PULL 05/11] xen-block: fix reporting of discard feature,
Kevin Wolf <=
- [PULL 09/11] block: qcow2: remove the created file on initialization error, Kevin Wolf, 2021/02/15
- [PULL 06/11] tests/qemu-iotests: Remove test 259 from the "auto" group, Kevin Wolf, 2021/02/15
- [PULL 03/11] blockjob: Fix crash with IOthread when block commit after snapshot, Kevin Wolf, 2021/02/15
- [PULL 10/11] monitor: Fix assertion failure on shutdown, Kevin Wolf, 2021/02/15
- [PULL 07/11] crypto: luks: Fix tiny memory leak, Kevin Wolf, 2021/02/15
- [PULL 08/11] block: add bdrv_co_delete_file_noerr, Kevin Wolf, 2021/02/15
- [PULL 11/11] monitor/qmp: Stop processing requests when shutdown is requested, Kevin Wolf, 2021/02/15
- [PULL 02/11] iotests: Consistent $IMGOPTS boundary matching, Kevin Wolf, 2021/02/15
- Re: [PULL 00/11] Block layer patches, Peter Maydell, 2021/02/15