summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-11-29 12:41:35 +0100
committerKevin Wolf <kwolf@redhat.com>2014-01-24 17:40:03 +0100
commit2c9880c45e2f9a98d11d44ce9966515c23870a86 (patch)
treeb69d9e878878dba426ec0d49cd797e97f3e33990
parent8407d5d7e265911b05949ee2ffd9e45c97bf0505 (diff)
downloadfocaccia-qemu-2c9880c45e2f9a98d11d44ce9966515c23870a86.tar.gz
focaccia-qemu-2c9880c45e2f9a98d11d44ce9966515c23870a86.zip
iscsi: Set bs->request_alignment
The iSCSI backend already gets the block size from the READ CAPACITY
command it sends.  Save it so that the generic block layer gets it
too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
-rw-r--r--block/iscsi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c
index c8bf8dc049..890bd81336 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1217,6 +1217,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
         goto out;
     }
     bs->total_sectors = sector_lun2qemu(iscsilun->num_blocks, iscsilun);
+    bs->request_alignment = iscsilun->block_size;
 
     /* Medium changer or tape. We dont have any emulation for this so this must
      * be sg ioctl compatible. We force it to be sg, otherwise qemu will try