yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
9ae3a8
From 36fb92fbc1edd351b923199559a0a923da9f72c4 Mon Sep 17 00:00:00 2001
9ae3a8
From: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Date: Tue, 29 Nov 2011 12:41:35 +0100
9ae3a8
Subject: [PATCH 30/37] iscsi: Set bs->request_alignment
9ae3a8
9ae3a8
Message-id: <1392117622-28812-31-git-send-email-kwolf@redhat.com>
9ae3a8
Patchwork-id: 57195
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH v2 30/37] iscsi: Set bs->request_alignment
9ae3a8
Bugzilla: 748906
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
RH-Acked-by: Max Reitz <mreitz@redhat.com>
9ae3a8
9ae3a8
From: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
9ae3a8
The iSCSI backend already gets the block size from the READ CAPACITY
9ae3a8
command it sends.  Save it so that the generic block layer gets it
9ae3a8
too.
9ae3a8
9ae3a8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Reviewed-by: Max Reitz <mreitz@redhat.com>
9ae3a8
(cherry picked from commit 2c9880c45e2f9a98d11d44ce9966515c23870a86)
9ae3a8
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
---
9ae3a8
 block/iscsi.c | 1 +
9ae3a8
 1 file changed, 1 insertion(+)
9ae3a8
---
9ae3a8
 block/iscsi.c |    1 +
9ae3a8
 1 files changed, 1 insertions(+), 0 deletions(-)
9ae3a8
9ae3a8
diff --git a/block/iscsi.c b/block/iscsi.c
9ae3a8
index 83e4f15..63a21e2 100644
9ae3a8
--- a/block/iscsi.c
9ae3a8
+++ b/block/iscsi.c
9ae3a8
@@ -1397,6 +1397,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
9ae3a8
         goto out;
9ae3a8
     }
9ae3a8
     bs->total_sectors = sector_lun2qemu(iscsilun->num_blocks, iscsilun);
9ae3a8
+    bs->request_alignment = iscsilun->block_size;
9ae3a8
 
9ae3a8
     /* Medium changer or tape. We dont have any emulation for this so this must
9ae3a8
      * be sg ioctl compatible. We force it to be sg, otherwise qemu will try
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8