All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [PATCH hci-8.2 v3 0/4] vhost-blk: support discard
@ 2026-11-27 12:46 Alexander Ivanov
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 1/4] vhost-blk: read any queue attribute of the backend from sysfs Alexander Ivanov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alexander Ivanov @ 2026-11-27 12:46 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: andrey.drobyshev, svt-core

vhost-blk in the kernel now handles VIRTIO_BLK_T_DISCARD. Detect discard
support of the backend the way write zeroes does and advertise the
discard limits in the config space.

Patch 1 generalizes the sysfs reader used for write zeroes.
Patch 2 factors out the probe of the backend built on it.
Patch 3 enables discard on a backend that supports it.
Patch 4 fails realize when the kernel lacks a requested feature.

The series applies on top of "vhost-blk: advertise write zeroes on a
backend that supports it" (VSTOR-141684). The kernel side is sent
separately.

v3:
- patch 2: new, move the sysfs probe of the backend into
  vhost_blk_probe_backend()
- patch 3: use vhost_blk_probe_backend() instead of an open-coded copy
  of the write zeroes probe
- patch 3: drop the warning at realize, see patch 4
- patch 4: new, fail realize instead of warning when the write-zeroes
  or discard property is on and the kernel does not support the feature

v2:
- patch 1: new, turn vhost_blk_has_write_zeroes() into
  vhost_blk_read_queue_attr()
- patch 2: read discard_max_bytes of the backend at startup and do not
  offer VIRTIO_BLK_F_DISCARD when the backend does not support discard,
  the limit cannot be read or the backend is opened read-only
- patch 2: advertise VHOST_BLK_MAX_RANGE_SECTORS, shared with write
  zeroes, instead of UINT32_MAX >> BDRV_SECTOR_BITS as the range limit
- patch 2: warn at realize when the kernel does not support discard

https://virtuozzo.atlassian.net/browse/VSTOR-141683

Alexander Ivanov (4):
  vhost-blk: read any queue attribute of the backend from sysfs
  vhost-blk: factor out the sysfs probe of the backend
  vhost-blk: advertise discard on a backend that supports it
  vhost-blk: fail realize when the kernel lacks write zeroes or discard

 hw/block/vhost-blk.c          | 80 +++++++++++++++++++++++++++--------
 include/hw/virtio/vhost-blk.h |  3 +-
 2 files changed, 64 insertions(+), 19 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH hci-8.2 v3 1/4] vhost-blk: read any queue attribute of the backend from sysfs
  2026-11-27 12:46 [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Alexander Ivanov
@ 2026-11-27 12:46 ` Alexander Ivanov
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 2/4] vhost-blk: factor out the sysfs probe of the backend Alexander Ivanov
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Ivanov @ 2026-11-27 12:46 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: andrey.drobyshev, svt-core

Turn vhost_blk_has_write_zeroes() into vhost_blk_read_queue_attr(),
which takes the name of the limit to check, so that discard support can
be detected the same way. No functional change.

https://virtuozzo.atlassian.net/browse/VSTOR-141683

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
 hw/block/vhost-blk.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
index 870f3496908..96878de5bb4 100644
--- a/hw/block/vhost-blk.c
+++ b/hw/block/vhost-blk.c
@@ -586,8 +586,8 @@ static bool vhost_blk_uevent_attach(VHostBlk *s, Error **errp)
     return true;
 }
 
-static bool vhost_blk_has_write_zeroes(dev_t rdev, bool *supported,
-                                       Error **errp)
+static bool vhost_blk_read_queue_attr(dev_t rdev, const char *attr,
+                                      bool *supported, Error **errp)
 {
     g_autofree char *dev = NULL;
     g_autofree char *part = NULL;
@@ -599,8 +599,9 @@ static bool vhost_blk_has_write_zeroes(dev_t rdev, bool *supported,
 
     dev = g_strdup_printf("/sys/dev/block/%u:%u", major(rdev), minor(rdev));
     part = g_strdup_printf("%s/partition", dev);
-    path = g_strdup_printf("%s/%squeue/write_zeroes_max_bytes", dev,
-                           g_file_test(part, G_FILE_TEST_EXISTS) ? "../" : "");
+    path = g_strdup_printf("%s/%squeue/%s", dev,
+                           g_file_test(part, G_FILE_TEST_EXISTS) ? "../" : "",
+                           attr);
     if (!g_file_get_contents(path, &val, NULL, &gerr)) {
         error_setg(errp, "%s", gerr->message);
         return false;
@@ -661,8 +662,9 @@ static bool vhost_blk_open_backend(VHostBlk *s, Error **errp)
         if (virtio_has_feature(s->host_features, VIRTIO_BLK_F_WRITE_ZEROES)) {
             Error *local_err = NULL;
 
-            if (!vhost_blk_has_write_zeroes(s->backend_rdev, &s->write_zeroes,
-                                            &local_err)) {
+            if (!vhost_blk_read_queue_attr(s->backend_rdev,
+                                           "write_zeroes_max_bytes",
+                                           &s->write_zeroes, &local_err)) {
                 warn_reportf_err(local_err, "vhost-blk: unable to read write "
                                  "zeroes limit of '%s': ", s->conf.devpath);
             } else if (!s->write_zeroes) {
-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH hci-8.2 v3 2/4] vhost-blk: factor out the sysfs probe of the backend
  2026-11-27 12:46 [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Alexander Ivanov
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 1/4] vhost-blk: read any queue attribute of the backend from sysfs Alexander Ivanov
@ 2026-11-27 12:46 ` Alexander Ivanov
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 3/4] vhost-blk: advertise discard on a backend that supports it Alexander Ivanov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Ivanov @ 2026-11-27 12:46 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: andrey.drobyshev, svt-core

Move the sysfs probe of the backend into vhost_blk_probe_backend(), so
that discard can reuse it. No functional change.

https://virtuozzo.atlassian.net/browse/VSTOR-141683

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
 hw/block/vhost-blk.c | 36 +++++++++++++++++++++++-------------
 1 file changed, 23 insertions(+), 13 deletions(-)

diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
index 96878de5bb4..427b73510ae 100644
--- a/hw/block/vhost-blk.c
+++ b/hw/block/vhost-blk.c
@@ -617,6 +617,26 @@ static bool vhost_blk_read_queue_attr(dev_t rdev, const char *attr,
     return true;
 }
 
+static void vhost_blk_probe_backend(VHostBlk *s, unsigned int bit,
+                                    const char *attr, const char *name,
+                                    bool *supported)
+{
+    Error *local_err = NULL;
+
+    if (!virtio_has_feature(s->host_features, bit)) {
+        return;
+    }
+
+    if (!vhost_blk_read_queue_attr(s->backend_rdev, attr, supported,
+                                   &local_err)) {
+        warn_reportf_err(local_err, "vhost-blk: unable to read %s limit of "
+                         "'%s': ", name, s->conf.devpath);
+    } else if (!*supported) {
+        warn_report("vhost-blk: '%s' does not support %s", s->conf.devpath,
+                    name);
+    }
+}
+
 static bool vhost_blk_open_backend(VHostBlk *s, Error **errp)
 {
     ERRP_GUARD();
@@ -659,19 +679,9 @@ static bool vhost_blk_open_backend(VHostBlk *s, Error **errp)
             goto fail;
         }
 
-        if (virtio_has_feature(s->host_features, VIRTIO_BLK_F_WRITE_ZEROES)) {
-            Error *local_err = NULL;
-
-            if (!vhost_blk_read_queue_attr(s->backend_rdev,
-                                           "write_zeroes_max_bytes",
-                                           &s->write_zeroes, &local_err)) {
-                warn_reportf_err(local_err, "vhost-blk: unable to read write "
-                                 "zeroes limit of '%s': ", s->conf.devpath);
-            } else if (!s->write_zeroes) {
-                warn_report("vhost-blk: '%s' does not support write zeroes",
-                            s->conf.devpath);
-            }
-        }
+        vhost_blk_probe_backend(s, VIRTIO_BLK_F_WRITE_ZEROES,
+                                "write_zeroes_max_bytes", "write zeroes",
+                                &s->write_zeroes);
     }
 
     vhost_blk_update_size(s, errp);
-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH hci-8.2 v3 3/4] vhost-blk: advertise discard on a backend that supports it
  2026-11-27 12:46 [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Alexander Ivanov
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 1/4] vhost-blk: read any queue attribute of the backend from sysfs Alexander Ivanov
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 2/4] vhost-blk: factor out the sysfs probe of the backend Alexander Ivanov
@ 2026-11-27 12:46 ` Alexander Ivanov
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 4/4] vhost-blk: fail realize when the kernel lacks write zeroes or discard Alexander Ivanov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Ivanov @ 2026-11-27 12:46 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: andrey.drobyshev, svt-core

vhost-blk in the kernel now handles VIRTIO_BLK_T_DISCARD, but with the
discard property on, the config space reports zero for max_discard_seg,
max_discard_sectors and discard_sector_alignment. A Linux guest reads a
zero max_discard_seg as seg_max and merges adjacent discards into one
multi-segment request, which the kernel rejects with
VIRTIO_BLK_S_UNSUPP.

Handle discard the way write zeroes is handled. Read discard_max_bytes
of a writable backend from sysfs once at startup and use it only to
tell whether the backend supports discard. The kernel sends a discard
as one bio, which the block layer splits by the backend limit, so it
bounds the range only by the size of one bio, as it does for write
zeroes. Advertise the constant write zeroes uses, renamed to
VHOST_BLK_MAX_RANGE_SECTORS, one segment per request, as virtio-blk
does, and the logical block size as the alignment. Do not offer
VIRTIO_BLK_F_DISCARD when the backend reports no limit, the limit
cannot be read, or the backend is opened read-only: the kernel fails a
discard on a read-only backend with VIRTIO_BLK_S_IOERR.

The property stays off by default. A kernel without discard support in
vhost-blk does not offer the feature, so it is not negotiated there.

https://virtuozzo.atlassian.net/browse/VSTOR-141683

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
 hw/block/vhost-blk.c          | 15 +++++++++++++--
 include/hw/virtio/vhost-blk.h |  3 ++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
index 427b73510ae..a2d5cfe9ea1 100644
--- a/hw/block/vhost-blk.c
+++ b/hw/block/vhost-blk.c
@@ -682,6 +682,8 @@ static bool vhost_blk_open_backend(VHostBlk *s, Error **errp)
         vhost_blk_probe_backend(s, VIRTIO_BLK_F_WRITE_ZEROES,
                                 "write_zeroes_max_bytes", "write zeroes",
                                 &s->write_zeroes);
+        vhost_blk_probe_backend(s, VIRTIO_BLK_F_DISCARD, "discard_max_bytes",
+                                "discard", &s->discard);
     }
 
     vhost_blk_update_size(s, errp);
@@ -843,6 +845,9 @@ static uint64_t vhost_blk_get_features(VirtIODevice *vdev,
     if (!s->write_zeroes) {
         virtio_clear_feature(&features, VIRTIO_BLK_F_WRITE_ZEROES);
     }
+    if (!s->discard) {
+        virtio_clear_feature(&features, VIRTIO_BLK_F_DISCARD);
+    }
 
     virtio_add_feature(&features, VIRTIO_BLK_F_BLK_SIZE);
     virtio_add_feature(&features, VIRTIO_BLK_F_SEG_MAX);
@@ -896,9 +901,16 @@ static void vhost_blk_update_config(VirtIODevice *vdev, uint8_t *config)
     blkcfg.physical_block_exp = get_physical_block_exp(conf);
     blkcfg.alignment_offset = 0;
     virtio_stw_p(vdev, &blkcfg.num_queues, s->conf.num_queues);
+    if (s->discard) {
+        virtio_stl_p(vdev, &blkcfg.max_discard_sectors,
+                     VHOST_BLK_MAX_RANGE_SECTORS);
+        virtio_stl_p(vdev, &blkcfg.discard_sector_alignment,
+                     blk_size >> BDRV_SECTOR_BITS);
+        virtio_stl_p(vdev, &blkcfg.max_discard_seg, 1);
+    }
     if (s->write_zeroes) {
         virtio_stl_p(vdev, &blkcfg.max_write_zeroes_sectors,
-                     VHOST_BLK_MAX_WRITE_ZEROES_SECTORS);
+                     VHOST_BLK_MAX_RANGE_SECTORS);
         blkcfg.write_zeroes_may_unmap = 1;
         virtio_stl_p(vdev, &blkcfg.max_write_zeroes_seg, 1);
     }
@@ -922,7 +934,6 @@ static const Property vhost_blk_properties[] = {
     DEFINE_PROP_UINT16("num-threads", VHostBlk, conf.num_threads, 1),
     DEFINE_PROP_BIT64("flush", VHostBlk, host_features,
                       VIRTIO_BLK_F_FLUSH, true),
-/* Discard not yet implemented in kernel module */
     DEFINE_PROP_BIT64("discard", VHostBlk, host_features,
                       VIRTIO_BLK_F_DISCARD, false),
     DEFINE_PROP_BIT64("write-zeroes", VHostBlk, host_features,
diff --git a/include/hw/virtio/vhost-blk.h b/include/hw/virtio/vhost-blk.h
index f05715c3809..9110462109f 100644
--- a/include/hw/virtio/vhost-blk.h
+++ b/include/hw/virtio/vhost-blk.h
@@ -22,7 +22,7 @@
 #define VHOST_BLK_AUTO_NUM_QUEUES UINT16_MAX
 #define VHOST_BLK_MAX_QUEUES 32
 /* Fits in one bio and is aligned to any logical block size */
-#define VHOST_BLK_MAX_WRITE_ZEROES_SECTORS (1U << 22)
+#define VHOST_BLK_MAX_RANGE_SECTORS (1U << 22)
 
 typedef struct VhostBlkConf {
     BlockConf conf;
@@ -49,6 +49,7 @@ typedef struct VHostBlk {
     uint64_t length;
     uint64_t backend_rdev;
     bool write_zeroes;
+    bool discard;
     QEMUBH *resize_bh;
     Error *cpr_blocker;
 } VHostBlk;
-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH hci-8.2 v3 4/4] vhost-blk: fail realize when the kernel lacks write zeroes or discard
  2026-11-27 12:46 [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Alexander Ivanov
                   ` (2 preceding siblings ...)
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 3/4] vhost-blk: advertise discard on a backend that supports it Alexander Ivanov
@ 2026-11-27 12:46 ` Alexander Ivanov
  2026-11-27 15:24 ` [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Andrey Drobyshev
  2026-11-30 14:09 ` Andrey Zhadchenko
  5 siblings, 0 replies; 7+ messages in thread
From: Alexander Ivanov @ 2026-11-27 12:46 UTC (permalink / raw)
  To: andrey.zhadchenko; +Cc: andrey.drobyshev, svt-core

With the write-zeroes or discard property on, a kernel without that
feature in vhost-blk silently does not offer it to the guest. A
migration from a node that does offer it then fails only in
virtio_load() with a generic "Features ... unsupported".

Fail realize instead and name the missing feature. A backend that
lacks the feature still only gets a warning.

https://virtuozzo.atlassian.net/browse/VSTOR-141683

Signed-off-by: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
---
 hw/block/vhost-blk.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/hw/block/vhost-blk.c b/hw/block/vhost-blk.c
index a2d5cfe9ea1..0e17b949726 100644
--- a/hw/block/vhost-blk.c
+++ b/hw/block/vhost-blk.c
@@ -702,6 +702,18 @@ fail:
     return false;
 }
 
+static bool vhost_blk_check_feature(VHostBlk *s, bool offered,
+                                    unsigned int bit, const char *name,
+                                    Error **errp)
+{
+    if (offered && !virtio_has_feature(s->dev.features, bit)) {
+        error_setg(errp, "vhost-blk: kernel does not support %s", name);
+        return false;
+    }
+
+    return true;
+}
+
 static void vhost_blk_device_realize(DeviceState *dev, Error **errp)
 {
     VirtIODevice *vdev = VIRTIO_DEVICE(dev);
@@ -781,6 +793,15 @@ static void vhost_blk_device_realize(DeviceState *dev, Error **errp)
         goto cleanup;
     }
 
+    if (!vhost_blk_check_feature(s, s->write_zeroes, VIRTIO_BLK_F_WRITE_ZEROES,
+                                 "write zeroes", errp) ||
+        !vhost_blk_check_feature(s, s->discard, VIRTIO_BLK_F_DISCARD,
+                                 "discard", errp)) {
+        vhost_dev_cleanup(&s->dev);
+        s->vhostfd = -1;
+        goto cleanup;
+    }
+
     return;
 
 cleanup:
-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH hci-8.2 v3 0/4] vhost-blk: support discard
  2026-11-27 12:46 [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Alexander Ivanov
                   ` (3 preceding siblings ...)
  2026-11-27 12:46 ` [PATCH hci-8.2 v3 4/4] vhost-blk: fail realize when the kernel lacks write zeroes or discard Alexander Ivanov
@ 2026-11-27 15:24 ` Andrey Drobyshev
  2026-11-30 14:09 ` Andrey Zhadchenko
  5 siblings, 0 replies; 7+ messages in thread
From: Andrey Drobyshev @ 2026-11-27 15:24 UTC (permalink / raw)
  To: Alexander Ivanov, andrey.zhadchenko; +Cc: svt-core

Reviewed-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>

On 11/27/26 2:46 PM, Alexander Ivanov wrote:
> vhost-blk in the kernel now handles VIRTIO_BLK_T_DISCARD. Detect discard
> support of the backend the way write zeroes does and advertise the
> discard limits in the config space.
> 
> Patch 1 generalizes the sysfs reader used for write zeroes.
> Patch 2 factors out the probe of the backend built on it.
> Patch 3 enables discard on a backend that supports it.
> Patch 4 fails realize when the kernel lacks a requested feature.
> 
> The series applies on top of "vhost-blk: advertise write zeroes on a
> backend that supports it" (VSTOR-141684). The kernel side is sent
> separately.
> 
> v3:
> - patch 2: new, move the sysfs probe of the backend into
>   vhost_blk_probe_backend()
> - patch 3: use vhost_blk_probe_backend() instead of an open-coded copy
>   of the write zeroes probe
> - patch 3: drop the warning at realize, see patch 4
> - patch 4: new, fail realize instead of warning when the write-zeroes
>   or discard property is on and the kernel does not support the feature
> 
> v2:
> - patch 1: new, turn vhost_blk_has_write_zeroes() into
>   vhost_blk_read_queue_attr()
> - patch 2: read discard_max_bytes of the backend at startup and do not
>   offer VIRTIO_BLK_F_DISCARD when the backend does not support discard,
>   the limit cannot be read or the backend is opened read-only
> - patch 2: advertise VHOST_BLK_MAX_RANGE_SECTORS, shared with write
>   zeroes, instead of UINT32_MAX >> BDRV_SECTOR_BITS as the range limit
> - patch 2: warn at realize when the kernel does not support discard
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-141683
> 
> Alexander Ivanov (4):
>   vhost-blk: read any queue attribute of the backend from sysfs
>   vhost-blk: factor out the sysfs probe of the backend
>   vhost-blk: advertise discard on a backend that supports it
>   vhost-blk: fail realize when the kernel lacks write zeroes or discard
> 
>  hw/block/vhost-blk.c          | 80 +++++++++++++++++++++++++++--------
>  include/hw/virtio/vhost-blk.h |  3 +-
>  2 files changed, 64 insertions(+), 19 deletions(-)
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH hci-8.2 v3 0/4] vhost-blk: support discard
  2026-11-27 12:46 [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Alexander Ivanov
                   ` (4 preceding siblings ...)
  2026-11-27 15:24 ` [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Andrey Drobyshev
@ 2026-11-30 14:09 ` Andrey Zhadchenko
  5 siblings, 0 replies; 7+ messages in thread
From: Andrey Zhadchenko @ 2026-11-30 14:09 UTC (permalink / raw)
  To: Alexander Ivanov; +Cc: andrey.drobyshev, svt-core

Reviewed-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>

On 27/11/2026 1:46 pm, Alexander Ivanov wrote:
> vhost-blk in the kernel now handles VIRTIO_BLK_T_DISCARD. Detect discard
> support of the backend the way write zeroes does and advertise the
> discard limits in the config space.
> 
> Patch 1 generalizes the sysfs reader used for write zeroes.
> Patch 2 factors out the probe of the backend built on it.
> Patch 3 enables discard on a backend that supports it.
> Patch 4 fails realize when the kernel lacks a requested feature.
> 
> The series applies on top of "vhost-blk: advertise write zeroes on a
> backend that supports it" (VSTOR-141684). The kernel side is sent
> separately.
> 
> v3:
> - patch 2: new, move the sysfs probe of the backend into
>    vhost_blk_probe_backend()
> - patch 3: use vhost_blk_probe_backend() instead of an open-coded copy
>    of the write zeroes probe
> - patch 3: drop the warning at realize, see patch 4
> - patch 4: new, fail realize instead of warning when the write-zeroes
>    or discard property is on and the kernel does not support the feature
> 
> v2:
> - patch 1: new, turn vhost_blk_has_write_zeroes() into
>    vhost_blk_read_queue_attr()
> - patch 2: read discard_max_bytes of the backend at startup and do not
>    offer VIRTIO_BLK_F_DISCARD when the backend does not support discard,
>    the limit cannot be read or the backend is opened read-only
> - patch 2: advertise VHOST_BLK_MAX_RANGE_SECTORS, shared with write
>    zeroes, instead of UINT32_MAX >> BDRV_SECTOR_BITS as the range limit
> - patch 2: warn at realize when the kernel does not support discard
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-141683
> 
> Alexander Ivanov (4):
>    vhost-blk: read any queue attribute of the backend from sysfs
>    vhost-blk: factor out the sysfs probe of the backend
>    vhost-blk: advertise discard on a backend that supports it
>    vhost-blk: fail realize when the kernel lacks write zeroes or discard
> 
>   hw/block/vhost-blk.c          | 80 +++++++++++++++++++++++++++--------
>   include/hw/virtio/vhost-blk.h |  3 +-
>   2 files changed, 64 insertions(+), 19 deletions(-)
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-30 14:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-27 12:46 [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Alexander Ivanov
2026-11-27 12:46 ` [PATCH hci-8.2 v3 1/4] vhost-blk: read any queue attribute of the backend from sysfs Alexander Ivanov
2026-11-27 12:46 ` [PATCH hci-8.2 v3 2/4] vhost-blk: factor out the sysfs probe of the backend Alexander Ivanov
2026-11-27 12:46 ` [PATCH hci-8.2 v3 3/4] vhost-blk: advertise discard on a backend that supports it Alexander Ivanov
2026-11-27 12:46 ` [PATCH hci-8.2 v3 4/4] vhost-blk: fail realize when the kernel lacks write zeroes or discard Alexander Ivanov
2026-11-27 15:24 ` [PATCH hci-8.2 v3 0/4] vhost-blk: support discard Andrey Drobyshev
2026-11-30 14:09 ` Andrey Zhadchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.