From nobody Mon Feb 9 01:11:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 154203167557788.89364746448007; Mon, 12 Nov 2018 06:07:55 -0800 (PST) Received: from localhost ([::1]:48800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMCsb-0006uD-RU for importer@patchew.org; Mon, 12 Nov 2018 09:07:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMCmb-0000di-UW for qemu-devel@nongnu.org; Mon, 12 Nov 2018 09:01:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMCmF-0001Hp-DX for qemu-devel@nongnu.org; Mon, 12 Nov 2018 09:01:29 -0500 Received: from fanzine.igalia.com ([91.117.99.155]:57646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMCmE-0001Em-TI; Mon, 12 Nov 2018 09:01:19 -0500 Received: from [194.100.51.2] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1gMCm8-00073w-Vk; Mon, 12 Nov 2018 15:01:13 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1gMClq-0007Cs-HR; Mon, 12 Nov 2018 16:00:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=References:In-Reply-To:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=si80j0+y8BG+mybcl3i7EhEO4w6DcRaFnnpYykLWLDc=; b=DNigNhw1lqES6qD6rEiiPdQe5FpfWwiHc/ItYHPfd/lyxsr8fBj4KTPJpQY5kmxov42fUkYwxws7B0q3rttOY7NKAZWw5O7cNA5K1SrWDG6R6LKTb7N+RMuXu5BY/YxQzCRq7bLzAcRihYd7j9ME150LqiBWEHkEHum3ErFLU144HpvGKnxPIsM0quSVdTXaaLb57/Uw6bzj+5b/wQKTkH0tay53bNe9ZMWe2BSxqGzKswthI3DgOo8rbxvlVxBzaxIhaUEiGP7qjJkhhrpDCseSPjIcsMxerbvGs+Yv3ljQdmDSKV/RI6nJ1ZcfPjxVWNaXnC59VuQv8ERLzFpK5w==; From: Alberto Garcia To: qemu-devel@nongnu.org Date: Mon, 12 Nov 2018 16:00:44 +0200 Message-Id: <88b5215904c3459d3bede40cdfe9f379171ec25e.1542031058.git.berto@igalia.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH v5 12/16] block: Remove flags parameter from bdrv_reopen_queue() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now that all callers are passing all flag changes as QDict options, the flags parameter is no longer necessary, so we can get rid of it. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- block.c | 5 +++-- block/replication.c | 6 ++---- include/block/block.h | 3 +-- qemu-io-cmds.c | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/block.c b/block.c index 31de7b2299..8b401e1cf4 100644 --- a/block.c +++ b/block.c @@ -3041,8 +3041,9 @@ static BlockReopenQueue *bdrv_reopen_queue_child(Bloc= kReopenQueue *bs_queue, =20 BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue, BlockDriverState *bs, - QDict *options, int flags) + QDict *options) { + int flags =3D bdrv_get_flags(bs); return bdrv_reopen_queue_child(bs_queue, bs, options, flags, NULL, NULL, 0); } @@ -3116,7 +3117,7 @@ int bdrv_reopen_set_read_only(BlockDriverState *bs, b= ool read_only, qdict_put_bool(opts, BDRV_OPT_READ_ONLY, read_only); =20 bdrv_subtree_drained_begin(bs); - queue =3D bdrv_reopen_queue(NULL, bs, opts, bdrv_get_flags(bs)); + queue =3D bdrv_reopen_queue(NULL, bs, opts); ret =3D bdrv_reopen_multiple(bdrv_get_aio_context(bs), queue, errp); bdrv_subtree_drained_end(bs); =20 diff --git a/block/replication.c b/block/replication.c index 481a225924..fdbfe47fa4 100644 --- a/block/replication.c +++ b/block/replication.c @@ -393,19 +393,17 @@ static void reopen_backing_file(BlockDriverState *bs,= bool writable, bdrv_subtree_drained_begin(s->secondary_disk->bs); =20 if (s->orig_hidden_read_only) { - int flags =3D bdrv_get_flags(s->hidden_disk->bs); QDict *opts =3D qdict_new(); qdict_put_bool(opts, BDRV_OPT_READ_ONLY, !writable); reopen_queue =3D bdrv_reopen_queue(reopen_queue, s->hidden_disk->b= s, - opts, flags); + opts); } =20 if (s->orig_secondary_read_only) { - int flags =3D bdrv_get_flags(s->secondary_disk->bs); QDict *opts =3D qdict_new(); qdict_put_bool(opts, BDRV_OPT_READ_ONLY, !writable); reopen_queue =3D bdrv_reopen_queue(reopen_queue, s->secondary_disk= ->bs, - opts, flags); + opts); } =20 if (reopen_queue) { diff --git a/include/block/block.h b/include/block/block.h index de72c7a093..f70a843b72 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -299,8 +299,7 @@ BlockDriverState *bdrv_open(const char *filename, const= char *reference, BlockDriverState *bdrv_new_open_driver(BlockDriver *drv, const char *node_= name, int flags, Error **errp); BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue, - BlockDriverState *bs, - QDict *options, int flags); + BlockDriverState *bs, QDict *options); int bdrv_reopen_multiple(AioContext *ctx, BlockReopenQueue *bs_queue, Erro= r **errp); int bdrv_reopen_set_read_only(BlockDriverState *bs, bool read_only, Error **errp); diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index c9ae09d574..2c39124036 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -2075,7 +2075,7 @@ static int reopen_f(BlockBackend *blk, int argc, char= **argv) } =20 bdrv_subtree_drained_begin(bs); - brq =3D bdrv_reopen_queue(NULL, bs, opts, flags); + brq =3D bdrv_reopen_queue(NULL, bs, opts); bdrv_reopen_multiple(bdrv_get_aio_context(bs), brq, &local_err); bdrv_subtree_drained_end(bs); =20 --=20 2.11.0