From patchwork Mon Feb 2 13:52:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 435518 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 B9CBF140276 for ; Tue, 3 Feb 2015 00:57:07 +1100 (AEDT) Received: from localhost ([::1]:54715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIHUw-0003T4-0X for incoming@patchwork.ozlabs.org; Mon, 02 Feb 2015 08:57:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIHSN-0007jk-Cv for qemu-devel@nongnu.org; Mon, 02 Feb 2015 08:54:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIHSH-0005UZ-A0 for qemu-devel@nongnu.org; Mon, 02 Feb 2015 08:54:27 -0500 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:45818 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIHSG-0005Tk-VT for qemu-devel@nongnu.org; Mon, 02 Feb 2015 08:54:21 -0500 Received: (qmail 6247 invoked by uid 89); 2 Feb 2015 13:54:16 -0000 Received: from [82.141.1.145] by client-16-kamp (envelope-from , uid 89) with qmail-scanner-2010/03/19-MF (clamdscan: 0.98.6/20018. hbedv: 8.3.28.14/7.11.206.130. spamassassin: 3.4.0. Clear:RC:1(82.141.1.145):SA:0(-1.2/5.0):. Processed in 1.303621 secs); 02 Feb 2015 13:54:16 -0000 Received: from ns.kamp-intra.net (HELO dns.kamp-intra.net) ([82.141.1.145]) by mx01.kamp.de with SMTP; 2 Feb 2015 13:54:15 -0000 X-GL_Whitelist: yes Received: from lieven-vm-neu (lieven-vm.kamp-intra.net [172.21.12.69]) by dns.kamp-intra.net (Postfix) with ESMTP id EFE4C206AB; Mon, 2 Feb 2015 14:52:44 +0100 (CET) Received: by lieven-vm-neu (Postfix, from userid 1000) id C283A2095A; Mon, 2 Feb 2015 14:52:23 +0100 (CET) From: Peter Lieven To: qemu-devel@nongnu.org Date: Mon, 2 Feb 2015 14:52:20 +0100 Message-Id: <1422885142-6391-4-git-send-email-pl@kamp.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1422885142-6391-1-git-send-email-pl@kamp.de> References: <1422885142-6391-1-git-send-email-pl@kamp.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a02:248:0:51::16 Cc: kwolf@redhat.com, famz@redhat.com, benoit@irqsave.net, ming.lei@canonical.com, Peter Lieven , armbru@redhat.com, mreitz@redhat.com, stefanha@redhat.com, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH v4 3/5] block-backend: expose bs->bl.max_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 Signed-off-by: Peter Lieven Reviewed-by: Max Reitz --- block/block-backend.c | 5 +++++ include/sysemu/block-backend.h | 1 + 2 files changed, 6 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index d00c129..c28e240 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -580,6 +580,11 @@ int blk_get_flags(BlockBackend *blk) return bdrv_get_flags(blk->bs); } +int blk_get_max_transfer_length(BlockBackend *blk) +{ + return blk->bs->bl.max_transfer_length; +} + void blk_set_guest_block_size(BlockBackend *blk, int align) { bdrv_set_guest_block_size(blk->bs, align); diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 8871a02..aab12b9 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -127,6 +127,7 @@ int blk_is_inserted(BlockBackend *blk); void blk_lock_medium(BlockBackend *blk, bool locked); void blk_eject(BlockBackend *blk, bool eject_flag); int blk_get_flags(BlockBackend *blk); +int blk_get_max_transfer_length(BlockBackend *blk); void blk_set_guest_block_size(BlockBackend *blk, int align); void *blk_blockalign(BlockBackend *blk, size_t size); bool blk_op_is_blocked(BlockBackend *blk, BlockOpType op, Error **errp);