From patchwork Sun Feb 9 08:46:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 318539 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49F502C00A5 for ; Sun, 9 Feb 2014 19:52:23 +1100 (EST) Received: from localhost ([::1]:49765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCQ7h-0002BU-7X for incoming@patchwork.ozlabs.org; Sun, 09 Feb 2014 03:52:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCQ2T-0003Nc-MH for qemu-devel@nongnu.org; Sun, 09 Feb 2014 03:47:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCQ2O-00018L-UJ for qemu-devel@nongnu.org; Sun, 09 Feb 2014 03:46:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCQ2O-00018H-M0 for qemu-devel@nongnu.org; Sun, 09 Feb 2014 03:46:52 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s198kpQj019441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 9 Feb 2014 03:46:51 -0500 Received: from dhcp-200-207.str.redhat.com (ovpn-116-23.ams2.redhat.com [10.36.116.23]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s198kbB4011464; Sun, 9 Feb 2014 03:46:50 -0500 From: Kevin Wolf To: anthony@codemonkey.ws Date: Sun, 9 Feb 2014 09:46:20 +0100 Message-Id: <1391935590-12264-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1391935590-12264-1-git-send-email-kwolf@redhat.com> References: <1391935590-12264-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 08/18] block/iscsi: always fill bs->bl.opt_transfer_length X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Lieven the opt_transfer_length has nothing to do with logical block provisioning stuff so always copy it from the block limits VPD page. Reported-By: Benoit Canet Signed-off-by: Peter Lieven Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf --- block/iscsi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 6f4af72..8d0f966 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1330,10 +1330,9 @@ static int iscsi_refresh_limits(BlockDriverState *bs) } bs->bl.write_zeroes_alignment = sector_lun2qemu(iscsilun->bl.opt_unmap_gran, iscsilun); - - bs->bl.opt_transfer_length = sector_lun2qemu(iscsilun->bl.opt_xfer_len, - iscsilun); } + bs->bl.opt_transfer_length = sector_lun2qemu(iscsilun->bl.opt_xfer_len, + iscsilun); return 0; }