aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-blk.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-09-06 18:58:56 +0200
committerKevin Wolf <kwolf@redhat.com>2011-09-12 15:17:22 +0200
commit7b6f9300d55c6f01a65ed27a25b87b2748faceee (patch)
treee324791fd740f92f06157f028958d207c52adf45 /hw/virtio-blk.c
parentfb0c61a5a51cd51f0c4e2f009ccb4a44bd9d8544 (diff)
block: New bdrv_set_buffer_alignment()
Device models should be able to set it without an unclean include of block_int.h. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r--hw/virtio-blk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 7bf684ee77..c2ee0001eb 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -15,7 +15,6 @@
#include "qemu-error.h"
#include "trace.h"
#include "blockdev.h"
-#include "block_int.h"
#include "virtio-blk.h"
#ifdef __linux__
# include <scsi/sg.h>
@@ -601,7 +600,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_dev_ops(s->bs, &virtio_block_ops, s);
- s->bs->buffer_alignment = conf->logical_block_size;
+ bdrv_set_buffer_alignment(s->bs, conf->logical_block_size);
add_boot_device_path(conf->bootindex, dev, "/disk@0,0");