From patchwork Tue Sep 11 22:32:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 10596451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0878814E0 for ; Tue, 11 Sep 2018 22:36:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED4A729DEA for ; Tue, 11 Sep 2018 22:36:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E19F129DF5; Tue, 11 Sep 2018 22:36:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9340029DEA for ; Tue, 11 Sep 2018 22:36:53 +0000 (UTC) Received: from localhost ([::1]:59833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrHA-0000FO-TC for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Sep 2018 18:36:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrDI-0003wj-7X for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:32:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzrDH-0006hu-69 for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:32:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42678) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzrDE-0006fA-EO; Tue, 11 Sep 2018 18:32:48 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 83BD5C05D3E0; Tue, 11 Sep 2018 22:32:47 +0000 (UTC) Received: from localhost (ovpn-116-183.phx2.redhat.com [10.3.116.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7467E60BE0; Tue, 11 Sep 2018 22:32:41 +0000 (UTC) From: Jeff Cody To: qemu-devel@nongnu.org Date: Tue, 11 Sep 2018 18:32:30 -0400 Message-Id: <5b49a980f2cde6610ab1df41bb0277d00b5db893.1536704901.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 11 Sep 2018 22:32:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 1/4] block/rbd: pull out qemu_rbd_convert_options 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: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, jsnow@redhat.com, qemu-stable@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Code movement to pull the conversion from Qdict to BlockdevOptionsRbd into a helper function. Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block/rbd.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index ca8e5bbace..b199450f9f 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -655,12 +655,34 @@ failed_opts: return r; } +static int qemu_rbd_convert_options(QDict *options, BlockdevOptionsRbd **opts, + Error **errp) +{ + Visitor *v; + Error *local_err = NULL; + + /* Convert the remaining options into a QAPI object */ + v = qobject_input_visitor_new_flat_confused(options, errp); + if (!v) { + return -EINVAL; + } + + visit_type_BlockdevOptionsRbd(v, NULL, opts, &local_err); + visit_free(v); + + if (local_err) { + error_propagate(errp, local_err); + return -EINVAL; + } + + return 0; +} + static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVRBDState *s = bs->opaque; BlockdevOptionsRbd *opts = NULL; - Visitor *v; const QDictEntry *e; Error *local_err = NULL; char *keypairs, *secretid; @@ -676,19 +698,9 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags, qdict_del(options, "password-secret"); } - /* Convert the remaining options into a QAPI object */ - v = qobject_input_visitor_new_flat_confused(options, errp); - if (!v) { - r = -EINVAL; - goto out; - } - - visit_type_BlockdevOptionsRbd(v, NULL, &opts, &local_err); - visit_free(v); - + r = qemu_rbd_convert_options(options, &opts, &local_err); if (local_err) { error_propagate(errp, local_err); - r = -EINVAL; goto out; } From patchwork Tue Sep 11 22:32:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 10596419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0001B14E0 for ; Tue, 11 Sep 2018 22:34:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E57BF29DDD for ; Tue, 11 Sep 2018 22:34:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D94E829DEA; Tue, 11 Sep 2018 22:34:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7A69729DDD for ; Tue, 11 Sep 2018 22:34:43 +0000 (UTC) Received: from localhost ([::1]:59814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrF4-0001pn-On for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Sep 2018 18:34:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrDP-0004Vv-1L for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:33:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzrDJ-0006kL-Vr for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:32:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52390) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzrDF-0006g1-QQ; Tue, 11 Sep 2018 18:32:50 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84632307D849; Tue, 11 Sep 2018 22:32:48 +0000 (UTC) Received: from localhost (ovpn-116-183.phx2.redhat.com [10.3.116.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 405E060BE0; Tue, 11 Sep 2018 22:32:48 +0000 (UTC) From: Jeff Cody To: qemu-devel@nongnu.org Date: Tue, 11 Sep 2018 18:32:31 -0400 Message-Id: <15b332e5432ad069441f7275a46080f465d789a0.1536704901.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 11 Sep 2018 22:32:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 2/4] block/rbd: Attempt to parse legacy filenames 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: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, jsnow@redhat.com, qemu-stable@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP When we converted rbd to get rid of the older key/value-centric encoding format, we broke compatibility with image files with backing file strings encoded in the old format. This leaves a bit of an ugly conundrum, and a hacky solution. If the initial attempt to parse the "proper" options fails, it assumes that we may have an older key/value encoded filename. Fall back to attempting to parse the filename, and extract the required options from it. If that fails, pass along the original error message. We do not support mixed modern usage alongside legacy keyvalue pair usage. A deprecation warning has been added, although care should be taken when actually deprecating since the impact is not limited to commandline or qapi usage, but also opening existing images. Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- block/rbd.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index b199450f9f..5090e4f662 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -678,6 +678,33 @@ static int qemu_rbd_convert_options(QDict *options, BlockdevOptionsRbd **opts, return 0; } +static int qemu_rbd_attempt_legacy_options(QDict *options, + BlockdevOptionsRbd **opts, + char **keypairs) +{ + char *filename; + int r; + + filename = g_strdup(qdict_get_try_str(options, "filename")); + if (!filename) { + return -EINVAL; + } + qdict_del(options, "filename"); + + qemu_rbd_parse_filename(filename, options, NULL); + + /* keypairs freed by caller */ + *keypairs = g_strdup(qdict_get_try_str(options, "=keyvalue-pairs")); + if (*keypairs) { + qdict_del(options, "=keyvalue-pairs"); + } + + r = qemu_rbd_convert_options(options, opts, NULL); + + g_free(filename); + return r; +} + static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { @@ -700,8 +727,30 @@ static int qemu_rbd_open(BlockDriverState *bs, QDict *options, int flags, r = qemu_rbd_convert_options(options, &opts, &local_err); if (local_err) { - error_propagate(errp, local_err); - goto out; + /* If keypairs are present, that means some options are present in + * the modern option format. Don't attempt to parse legacy option + * formats, as we won't support mixed usage. */ + if (keypairs) { + error_propagate(errp, local_err); + goto out; + } + + /* If the initial attempt to convert and process the options failed, + * we may be attempting to open an image file that has the rbd options + * specified in the older format consisting of all key/value pairs + * encoded in the filename. Go ahead and attempt to parse the + * filename, and see if we can pull out the required options. */ + r = qemu_rbd_attempt_legacy_options(options, &opts, &keypairs); + if (r < 0) { + error_propagate(errp, local_err); + goto out; + } + /* Take care whenever deciding to actually deprecate; once this ability + * is removed, we will not be able to open any images with legacy-styled + * backing image strings. */ + error_report("RBD options encoded in the filename as keyvalue pairs " + "is deprecated. Future versions may cease to parse " + "these options in the future."); } /* Remove the processed options from the QDict (the visitor processes From patchwork Tue Sep 11 22:32:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 10596421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 110DC14E0 for ; Tue, 11 Sep 2018 22:34:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0238329DDD for ; Tue, 11 Sep 2018 22:34:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAACC29DEA; Tue, 11 Sep 2018 22:34:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7B2EE29DDD for ; Tue, 11 Sep 2018 22:34:49 +0000 (UTC) Received: from localhost ([::1]:59815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrFA-00029e-PX for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Sep 2018 18:34:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrDS-0004oL-OJ for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:33:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzrDR-0006pL-Dm for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:33:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45670) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzrDG-0006gi-VL; Tue, 11 Sep 2018 18:32:51 -0400 Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7E6AE3002399; Tue, 11 Sep 2018 22:32:49 +0000 (UTC) Received: from localhost (ovpn-116-183.phx2.redhat.com [10.3.116.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C03186B95; Tue, 11 Sep 2018 22:32:49 +0000 (UTC) From: Jeff Cody To: qemu-devel@nongnu.org Date: Tue, 11 Sep 2018 18:32:32 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 11 Sep 2018 22:32:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 3/4] block/rbd: add iotest for rbd legacy keyvalue filename parsing 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: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, jsnow@redhat.com, qemu-stable@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is a small test that will check for the ability to parse both legacy and modern options for rbd. The way the test is set up is for failure to occur, but without having to wait to timeout on a non-existent rbd server. The error messages in the success path show that the arguments were parsed. The failure behavior prior to the patch series that has this test, is qemu-img complaining about mandatory options (e.g. 'pool') not being provided. Reviewed-by: Eric Blake Signed-off-by: Jeff Cody --- tests/qemu-iotests/231 | 62 ++++++++++++++++++++++++++++++++++++++ tests/qemu-iotests/231.out | 9 ++++++ tests/qemu-iotests/group | 1 + 3 files changed, 72 insertions(+) create mode 100755 tests/qemu-iotests/231 create mode 100644 tests/qemu-iotests/231.out diff --git a/tests/qemu-iotests/231 b/tests/qemu-iotests/231 new file mode 100755 index 0000000000..3e283708b4 --- /dev/null +++ b/tests/qemu-iotests/231 @@ -0,0 +1,62 @@ +#!/bin/bash +# +# Test legacy and modern option parsing for rbd/ceph. This will not +# actually connect to a ceph server, but rather looks for the appropriate +# error message that indicates we parsed the options correctly. +# +# Copyright (C) 2018 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# creator +owner=jcody@redhat.com + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +status=1 # failure is the default! + +_cleanup() +{ + rm "${BOGUS_CONF}" +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +_supported_fmt generic +_supported_proto rbd +_supported_os Linux + +BOGUS_CONF=${TEST_DIR}/ceph-$$.conf +touch "${BOGUS_CONF}" + +_filter_conf() +{ + sed -e "s#$BOGUS_CONF#BOGUS_CONF#g" +} + +# We expect this to fail, with no monitor ip provided and a null conf file. Just want it +# to fail in the right way. +$QEMU_IMG info "json:{'file.driver':'rbd','file.filename':'rbd:rbd/bogus:conf=${BOGUS_CONF}'}" 2>&1 | _filter_conf +$QEMU_IMG info "json:{'file.driver':'rbd','file.pool':'rbd','file.image':'bogus','file.conf':'${BOGUS_CONF}'}" 2>&1 | _filter_conf + +# success, all done +echo "*** done" +rm -f $seq.full +status=0 diff --git a/tests/qemu-iotests/231.out b/tests/qemu-iotests/231.out new file mode 100644 index 0000000000..579ba11c16 --- /dev/null +++ b/tests/qemu-iotests/231.out @@ -0,0 +1,9 @@ +QA output created by 231 +qemu-img: RBD options encoded in the filename as keyvalue pairs is deprecated. Future versions may cease to parse these options in the future. +unable to get monitor info from DNS SRV with service name: ceph-mon +no monitors specified to connect to. +qemu-img: Could not open 'json:{'file.driver':'rbd','file.filename':'rbd:rbd/bogus:conf=BOGUS_CONF'}': error connecting: No such file or directory +unable to get monitor info from DNS SRV with service name: ceph-mon +no monitors specified to connect to. +qemu-img: Could not open 'json:{'file.driver':'rbd','file.pool':'rbd','file.image':'bogus','file.conf':'BOGUS_CONF'}': error connecting: No such file or directory +*** done diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group index 743790745b..31f6e77dcb 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -226,3 +226,4 @@ 226 auto quick 227 auto quick 229 auto quick +231 auto quick From patchwork Tue Sep 11 22:32:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 10596453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 93A2B15E2 for ; Tue, 11 Sep 2018 22:38:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82377299F4 for ; Tue, 11 Sep 2018 22:38:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7395F29A3D; Tue, 11 Sep 2018 22:38:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EC348299F4 for ; Tue, 11 Sep 2018 22:38:18 +0000 (UTC) Received: from localhost ([::1]:59839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrIY-0005KD-BA for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Sep 2018 18:38:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzrDS-0004ls-C8 for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:33:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzrDR-0006pV-F2 for qemu-devel@nongnu.org; Tue, 11 Sep 2018 18:33:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51172) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzrDH-0006hX-RO; Tue, 11 Sep 2018 18:32:52 -0400 Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EFA9317C3E4; Tue, 11 Sep 2018 22:32:50 +0000 (UTC) Received: from localhost (ovpn-116-183.phx2.redhat.com [10.3.116.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 363C686B95; Tue, 11 Sep 2018 22:32:50 +0000 (UTC) From: Jeff Cody To: qemu-devel@nongnu.org Date: Tue, 11 Sep 2018 18:32:33 -0400 Message-Id: <647f5b5ab7efd8bf567a504c832b1d2d6f719b23.1536704901.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 11 Sep 2018 22:32:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 4/4] block/rbd: add deprecation documentation for filename keyvalue pairs 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: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, jsnow@redhat.com, qemu-stable@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jeff Cody --- qemu-deprecated.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 1b9c007f12..8d285b281e 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -190,6 +190,21 @@ used instead. In order to prevent QEMU from automatically opening an image's backing chain, use ``"backing": null'' instead. +@subsubsection rbd keyvalue pair encoded filenames: "" (since 3.1.0) + +Options for ``rbd'' should be specified according to its runtime options, +like other block drivers. Legacy parsing of keyvalue pair encoded +filenames is useful to open images with the old format for backing files; +These image files should be updated to use the current format. + +Example of legacy encoding: + +@code{json:@{"file.driver":"rbd", "file.filename":"rbd:rbd/name"@}} + +The above, converted to the current supported format: + +@code{json:@{"file.driver":"rbd", "file.pool":"rbd", "file.image":"name"@}} + @subsection vio-spapr-device device options @subsubsection "irq": "" (since 3.0.0)