From patchwork Tue Dec 13 12:37:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 131077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2656B1007D3 for ; Wed, 14 Dec 2011 00:05:54 +1100 (EST) Received: from localhost ([::1]:60628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaRcf-0005lb-Lr for incoming@patchwork.ozlabs.org; Tue, 13 Dec 2011 07:38:17 -0500 Received: from eggs.gnu.org ([140.186.70.92]:44623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaRc5-00041T-Da for qemu-devel@nongnu.org; Tue, 13 Dec 2011 07:37:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaRbz-0004G9-So for qemu-devel@nongnu.org; Tue, 13 Dec 2011 07:37:41 -0500 Received: from mail-yw0-f45.google.com ([209.85.213.45]:63177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaRbz-0004Es-LO for qemu-devel@nongnu.org; Tue, 13 Dec 2011 07:37:35 -0500 Received: by mail-yw0-f45.google.com with SMTP id g71so370792yhg.4 for ; Tue, 13 Dec 2011 04:37:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=j7kN8+mM5YPDcLFQ2fuIqtSujhT9Sji3H+EgdQLvyLA=; b=I2ZRtXnlJisYY4FI0qtOVtot8Iz6Qw6HkQEusdHM0HsG1XLeCH076mB/3kiGcW+TwY vAKc9iRxrXK0o5floJd/fl+c1Lrs6OE/Lee30hnZuKp+ErAUuHMeDrGZ6rbenq3ppDcZ 3xgg114c0i4gLi1TMfc95Fvgof1dRn1ea5AJk= Received: by 10.236.190.130 with SMTP id e2mr3068364yhn.107.1323779855438; Tue, 13 Dec 2011 04:37:35 -0800 (PST) Received: from localhost.localdomain (93-34-178-147.ip50.fastwebnet.it. [93.34.178.147]) by mx.google.com with ESMTPS id i50sm35972917yhk.11.2011.12.13.04.37.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Dec 2011 04:37:34 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 13 Dec 2011 13:37:06 +0100 Message-Id: <1323779840-4235-4-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.7.1 In-Reply-To: <1323779840-4235-1-git-send-email-pbonzini@redhat.com> References: <1323779840-4235-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.45 Subject: [Qemu-devel] [PATCH 03/17] block: pass protocol flags up to the format 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 In the next patches, the protocols will modify bs->open_flags to signify that they cannot support the exact requested feature set. Pass the modified flags to the format. Signed-off-by: Paolo Bonzini --- block.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index fa11e3a..6734e66 100644 --- a/block.c +++ b/block.c @@ -612,8 +612,9 @@ static int bdrv_open_common(BlockDriverState *bs, const char *filename, ret = drv->bdrv_file_open(bs, filename, open_flags); } else { ret = bdrv_file_open(&bs->file, filename, open_flags); + bs->open_flags = bs->file->open_flags; if (ret >= 0) { - ret = drv->bdrv_open(bs, open_flags); + ret = drv->bdrv_open(bs, bs->file->open_flags); } }