Skip to contentSkip to conversation

Block patches

GIT PULL Applied Stefan Hajnoczi 2 participants 3 messages Aug 12, 2024 – Aug 13, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The following changes since commit 0f397dcfecc9211d12c2c720c01eb32f0eaa7d23:

Merge tag 'pull-nbd-2024-08-08' of https://repo.or.cz/qemu/ericb into staging (2024-08-09 08:40:37 +1000)

are available in the Git repository at:

https://gitlab.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 547c4e50929ec6c091d9c16a7b280e829b12b463:

block/blkio: use FUA flag on write zeroes only if supported (2024-08-12 11:41:29 -0400)

----------------------------------------------------------------
Pull request

Fix for hosts with an older libblkio.

----------------------------------------------------------------

Stefano Garzarella (1):
block/blkio: use FUA flag on write zeroes only if supported

 meson.build   | 2 ++
 block/blkio.c | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
2.46.0
#1 lore raw

[PULL 1/1] block/blkio: use FUA flag on write zeroes only if supported

From: Stefano Garzarella <[email protected]>

libblkio supports BLKIO_REQ_FUA with write zeros requests only since version 1.4.0, so let's inform the block layer that the blkio driver supports it only in this case. Otherwise we can have runtime errors as reported in https://issues.redhat.com/browse/RHEL-32878

Message-id: [email protected]

---
 meson.build   | 2 ++
 block/blkio.c | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
meson.build +2 -0
index c2a050b844..81ecd4bae7 100644
@@ -2305,6 +2305,8 @@ config_host_data.set('CONFIG_BLKIO', blkio.found())
 if blkio.found()
   config_host_data.set('CONFIG_BLKIO_VHOST_VDPA_FD',
                        blkio.version().version_compare('>=1.3.0'))
+  config_host_data.set('CONFIG_BLKIO_WRITE_ZEROS_FUA',
+                       blkio.version().version_compare('>=1.4.0'))
 endif
 config_host_data.set('CONFIG_CURL', curl.found())
 config_host_data.set('CONFIG_CURSES', curses.found())
block/blkio.c +4 -2
index 3d9a2e764c..e0e765af63 100644
@@ -899,8 +899,10 @@ static int blkio_open(BlockDriverState *bs, QDict *options, int flags,
     }
 
     bs->supported_write_flags = BDRV_REQ_FUA | BDRV_REQ_REGISTERED_BUF;
-    bs->supported_zero_flags = BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP |
-                               BDRV_REQ_NO_FALLBACK;
+    bs->supported_zero_flags = BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK;
+#ifdef CONFIG_BLKIO_WRITE_ZEROS_FUA
+    bs->supported_zero_flags |= BDRV_REQ_FUA;
+#endif
 
     qemu_mutex_init(&s->blkio_lock);
     qemu_co_mutex_init(&s->bounce_lock);
Signature · 1 line
2.46.0
#2 lore raw
In reply to Stefan Hajnoczi
Quoted 8 lines · Stefan Hajnoczi

The following changes since commit 0f397dcfecc9211d12c2c720c01eb32f0eaa7d23:

   Merge tag 'pull-nbd-2024-08-08' ofhttps://repo.or.cz/qemu/ericb into staging (2024-08-09 08:40:37 +1000)

are available in the Git repository at:

https://gitlab.com/stefanha/qemu.git tags/block-pull-request

Quoted 8 lines

for you to fetch changes up to 547c4e50929ec6c091d9c16a7b280e829b12b463:

block/blkio: use FUA flag on write zeroes only if supported (2024-08-12 11:41:29 -0400)

----------------------------------------------------------------
Pull request

Fix for hosts with an older libblkio.

Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.

r~