From 2c9880c45e2f9a98d11d44ce9966515c23870a86 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 29 Nov 2011 12:41:35 +0100 Subject: 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 Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/iscsi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block/iscsi.c') 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 -- cgit v1.2.1