cryptospore / rpms / qemu-kvm

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