[3/5] virtio-blk: propagate the required alignment

Submitted by Christoph Hellwig on Sept. 12, 2010, 9:43 p.m.

Details

Message ID 20100912214339.GB4893@lst.de
State New
Headers show

Commit Message

Christoph Hellwig Sept. 12, 2010, 9:43 p.m.
Signed-off-by: Christoph Hellwig <hch@lst.de>

Patch hide | download patch | download mbox

Index: qemu/hw/virtio-blk.c
===================================================================
--- qemu.orig/hw/virtio-blk.c	2010-09-12 14:42:46.721759377 -0300
+++ qemu/hw/virtio-blk.c	2010-09-12 14:51:09.737759375 -0300
@@ -540,6 +540,7 @@  VirtIODevice *virtio_blk_init(DeviceStat
     register_savevm(dev, "virtio-blk", virtio_blk_id++, 2,
                     virtio_blk_save, virtio_blk_load, s);
     bdrv_set_removable(s->bs, 0);
+    s->bs->buffer_alignment = conf->logical_block_size;
 
     return &s->vdev;
 }