From nobody Sun Feb 8 08:43:19 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1532381443082310.9372048307072; Mon, 23 Jul 2018 14:30:43 -0700 (PDT) Received: from localhost ([::1]:36788 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhiPY-00077W-0x for importer@patchew.org; Mon, 23 Jul 2018 17:30:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhL5-0004HV-8j for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:21:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhL4-0005Yg-Bm for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:21:51 -0400 Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:42550) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhL4-0005YV-62; Mon, 23 Jul 2018 16:21:50 -0400 Received: by mail-oi0-x232.google.com with SMTP id n84-v6so3474865oib.9; Mon, 23 Jul 2018 13:21:50 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id i204-v6sm19825050oia.41.2018.07.23.13.21.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=B3mPa80GccDx82r8PLfrwi9rXV+l9VnjPsY4TDa0+QU=; b=QTcK5EH8uR62WnR6U6mFdmZCOgaWpb1P3DI5dIrFD7J9ZIzNWQT40SQkAhNh2cdfLP Q0gjZD3D91lUbBxWgzJjRt5asE6TCcwWJ8Ofhy6Uuzgaob9kISHzIn+WHEj0aqTNGxKW 8vLKooCogIQGeYZeTGn0CLmtEgnKaES8ZqRlgnIbVJpid6s5nyaQE+Lim/2BK2tXf+6a 3wskdJHHouyDW1kA8TtRQH06mORlwyfQFyy+ntkMthekA1vtUw/017mwH665rbsUR2bQ rytxGZ1wQTQ97yyypCSVg3Ng9jzQ9na6fT6F/Y/KArpgThMGl/PaZn3CO9Xnz6D1SjaB 7Zkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=B3mPa80GccDx82r8PLfrwi9rXV+l9VnjPsY4TDa0+QU=; b=ZmaAyigHy/um6BbdmfAG/Rb/JWlkgF9niJz9/7CHx75v3ahkm6EIuDk2GvhbHoqtel uuDZdM7B+1CRgx3EAC6E1MR8lxHu9+stqUHpdzmCP6ulPycRnz0VCgCNB13URWMZP3NM PH4ZaKPduIHc01ZNkYDNCNt8JAmuCTgF8z/0KrwWeMoLFAwpEoWbRdV8BV/FrSCn27vV wXT/zLAr6UBR/GTvz51KWaHaTfTlwDNQA+C3O8vihnm/IftkRc1kNXHP948FUM4RE/6R D98q7Et1lmeMpBBjjQsvvUukY2WT/lNGS5+ErAxkEjjAoj+Uu7S/Ow6SZs1sHeotqkw0 kzFQ== X-Gm-Message-State: AOUpUlFAYSIiMV3wCISD3cHMgZNQDkWtNJ2MBSjAggh8CXG581djG6kr qfmHfwrV2y7KejdRhRCc/d43LjSSGq0H0w== X-Google-Smtp-Source: AAOMgpe7FRkE7EOOHULG7xc2YItivj002vBssku6yraG36+/47818zSjFucB1rOcRUfoRUVU6TeqZA== X-Received: by 2002:aca:c355:: with SMTP id t82-v6mr284623oif.327.1532377309079; Mon, 23 Jul 2018 13:21:49 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:17:37 -0500 Message-Id: <20180723201748.25573-89-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::232 Subject: [Qemu-devel] [PATCH 88/99] nfs: Remove processed options from QDict 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 , Jeff Cody , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Kevin Wolf Commit c22a03454 QAPIfied option parsing in the NFS block driver, but forgot to remove all the options we processed. Therefore, we get an error in bdrv_open_inherit(), which thinks the remaining options are invalid. Trying to open an NFS image will result in an error like this: Block protocol 'nfs' doesn't support the option 'server.host' Remove all options from the QDict to make the NFS driver work again. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf Message-id: 20180516160816.26259-1-kwolf@redhat.com Reviewed-by: Eric Blake Reviewed-by: Jeff Cody Signed-off-by: Jeff Cody (cherry picked from commit c82be42cc803b36fd7aed5dceec68312c7056fd5) Signed-off-by: Michael Roth --- block/nfs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/block/nfs.c b/block/nfs.c index 2577df4b26..dc12d5000d 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -557,6 +557,7 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(QD= ict *options, BlockdevOptionsNfs *opts =3D NULL; QObject *crumpled =3D NULL; Visitor *v; + const QDictEntry *e; Error *local_err =3D NULL; =20 crumpled =3D qdict_crumple(options, errp); @@ -573,6 +574,12 @@ static BlockdevOptionsNfs *nfs_options_qdict_to_qapi(Q= Dict *options, return NULL; } =20 + /* Remove the processed options from the QDict (the visitor processes + * _all_ options in the QDict) */ + while ((e =3D qdict_first(options))) { + qdict_del(options, e->key); + } + return opts; } =20 --=20 2.17.1