Patchwork [12/20] virtio-blk: propagate the required alignment

login
register
mail settings
Submitter Kevin Wolf
Date Sept. 21, 2010, 3:21 p.m.
Message ID <1285082522-24407-13-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/65326/
State New
Headers show

Comments

Kevin Wolf - Sept. 21, 2010, 3:21 p.m.
From: Christoph Hellwig <hch@lst.de>

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 hw/virtio-blk.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index bd6bbe6..a1df26d 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -540,6 +540,7 @@  VirtIODevice *virtio_blk_init(DeviceState *dev, BlockConf *conf)
     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;
 }