All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtio-blk: Respect discard granularity
@ 2021-02-19 10:19 Akihiko Odaki
  2021-02-22 16:49 ` Stefan Hajnoczi
  0 siblings, 1 reply; 10+ messages in thread
From: Akihiko Odaki @ 2021-02-19 10:19 UTC (permalink / raw)
  Cc: Kevin Wolf, Akihiko Odaki, qemu-block, Michael S. Tsirkin,
	qemu-devel, Max Reitz, Stefan Hajnoczi

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 hw/block/virtio-blk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index bac2d6fa2b2..692fd17b0e0 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -965,7 +965,7 @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config)
         virtio_stl_p(vdev, &blkcfg.max_discard_sectors,
                      s->conf.max_discard_sectors);
         virtio_stl_p(vdev, &blkcfg.discard_sector_alignment,
-                     blk_size >> BDRV_SECTOR_BITS);
+                     conf->discard_granularity >> BDRV_SECTOR_BITS);
         /*
          * We support only one segment per request since multiple segments
          * are not widely used and there are no userspace APIs that allow
-- 
2.24.3 (Apple Git-128)



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

end of thread, other threads:[~2021-03-08 16:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 10:19 [PATCH] virtio-blk: Respect discard granularity Akihiko Odaki
2021-02-22 16:49 ` Stefan Hajnoczi
2021-02-23  5:36   ` [PATCH v2] " Akihiko Odaki
2021-02-23 11:24     ` Stefano Garzarella
2021-02-23 12:09       ` [PATCH v3] " Akihiko Odaki
2021-02-23 14:26         ` Michael S. Tsirkin
2021-02-24 10:17         ` Stefano Garzarella
2021-02-25  0:12           ` [PATCH v4] " Akihiko Odaki
2021-02-25  8:34             ` Stefano Garzarella
2021-03-08 16:52             ` Stefan Hajnoczi

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.