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

login
register
mail settings
Submitter Christoph Hellwig
Date Sept. 12, 2010, 9:43 p.m.
Message ID <20100912214339.GB4893@lst.de>
Download mbox | patch
Permalink /patch/64567/
State New
Headers show

Comments

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

Patch

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;
 }