Patchwork [4/5] scsi-disk: propagate the required alignment

login
register
mail settings
Submitter Christoph Hellwig
Date Sept. 12, 2010, 9:43 p.m.
Message ID <20100912214350.GC4893@lst.de>
Download mbox | patch
Permalink /patch/64565/
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/scsi-disk.c
===================================================================
--- qemu.orig/hw/scsi-disk.c	2010-09-12 14:43:04.694759377 -0300
+++ qemu/hw/scsi-disk.c	2010-09-12 14:50:19.049759376 -0300
@@ -1178,6 +1178,7 @@  static int scsi_disk_initfn(SCSIDevice *
         s->qdev.blocksize = s->qdev.conf.logical_block_size;
     }
     s->cluster_size = s->qdev.blocksize / 512;
+    s->bs->buffer_alignment = s->qdev.blocksize;
 
     s->qdev.type = TYPE_DISK;
     qemu_add_vm_change_state_handler(scsi_dma_restart_cb, s);