From patchwork Mon Dec 20 20:00:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12688475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3570EC433FE for ; Mon, 20 Dec 2021 20:14:20 +0000 (UTC) Received: from localhost ([::1]:48430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzP35-0006UF-Av for qemu-devel@archiver.kernel.org; Mon, 20 Dec 2021 15:14:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzOq1-0001jC-CP for qemu-devel@nongnu.org; Mon, 20 Dec 2021 15:00:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:29023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzOpx-00038U-8i for qemu-devel@nongnu.org; Mon, 20 Dec 2021 15:00:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640030444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ayL3Y6gZm6XhBH2r4HXO5sw4wKPzmz4WxHL5sCFdC0w=; b=Vosw03CrYIlY/iNkP/UY0M71Di6h1tvAuz0zwgWl+2lfZw6+mW3K4pvQIbMTeNpaRycXoI XKZgRtcXTkiPt+bflB7ZPc31AiuuIAeAijKHjJRK+GNxQ8nrny8GHpbyrcCHxw3H0q8cKy QDduEbMxr6B3ysEdV9TTHEGHPmK9nKQ= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-473-GKxjaKHjOiCi7xch6YLq4g-1; Mon, 20 Dec 2021 15:00:43 -0500 X-MC-Unique: GKxjaKHjOiCi7xch6YLq4g-1 Received: by mail-wm1-f70.google.com with SMTP id u10-20020a05600c19ca00b00345b2959e5aso66584wmq.9 for ; Mon, 20 Dec 2021 12:00:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ayL3Y6gZm6XhBH2r4HXO5sw4wKPzmz4WxHL5sCFdC0w=; b=mOFbNykafUU30gj9+542IcsfPPL2g6JP3NwknMtQyLLI7eURN8xSZ3P2VL3QpTocHq /RALGZ3L0de0m4BhS5lrSdpj9y5qhs/119xKAj0nrxyTuuK45Y3j7FxhAezgKG1qW4mR mn2G7g2KbRTSzWo9xz/WfkzASSxxSAbPOkaMrUdmbttQf8d81vnda0IOzoMwAqsrh1Ir +iAbbQnOJFHucGtU6K+VzmXK8QGXlaZAV8NJmoZql0eSiM/12OW9IlDlIjvng6fO5zjq dI+P83fnSjy40tCVnIxk/zdcAiJIU2NH8OwSdzqRNOqJmDSPghkPRgC3ywujMjKEs1Ky hoig== X-Gm-Message-State: AOAM532IhrRxAWBlNjqTjrICNdrgPp5gq0pvOvyRyELlt2TYg5uNWouU 61khtlslGElwQH+blOZU7zJj8OzSTzYmbjZUjAhKOo6LD6MhcYub6TAce6svudlGEaTMMaynZho GVtqKeKOITrS3/GJS+iCIjblQmrAi+s5VXRnOz1TCQE5Ns97U48maD3RFFo28NiSP X-Received: by 2002:a05:600c:3787:: with SMTP id o7mr500342wmr.41.1640030441427; Mon, 20 Dec 2021 12:00:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkPrcst9q21KRPZPYPKYU6oqIbOGKWi4+CYr42MOCnXy/l0Ei7BprLQicqm7wzEDQ3wYysYQ== X-Received: by 2002:a05:600c:3787:: with SMTP id o7mr500311wmr.41.1640030441170; Mon, 20 Dec 2021 12:00:41 -0800 (PST) Received: from x1w.redhat.com (174.red-83-50-185.dynamicip.rima-tde.net. [83.50.185.174]) by smtp.gmail.com with ESMTPSA id a22sm291743wme.19.2021.12.20.12.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 12:00:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/2] qemu-storage-daemon: Add vhost-user-blk help Date: Mon, 20 Dec 2021 21:00:33 +0100 Message-Id: <20211220200034.2233987-2-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211220200034.2233987-1-philmd@redhat.com> References: <20211220200034.2233987-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.209, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Qing Wang , qemu-block@nongnu.org, Eric Blake , Markus Armbruster , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add missing vhost-user-blk help: $ qemu-storage-daemon -h ... --export [type=]vhost-user-blk,id=,node-name=, addr.type=unix,addr.path=[,writable=on|off] [,logical-block-size=][,num-queues=] export the specified block node as a vhosts-user-blk device over UNIX domain socket --export [type=]vhost-user-blk,id=,node-name=, fd,addr.str=[,writable=on|off] [,logical-block-size=][,num-queues=] export the specified block node as a vhosts-user-blk device over file descriptor ... Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API") Reported-by: Qing Wang Signed-off-by: Philippe Mathieu-Daudé --- storage-daemon/qemu-storage-daemon.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-storage-daemon.c index 52cf17e8ace..0c19e128e3f 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -104,6 +104,19 @@ static void help(void) " export the specified block node over FUSE\n" "\n" #endif /* CONFIG_FUSE */ +#ifdef CONFIG_VHOST_USER_BLK_SERVER +" --export [type=]vhost-user-blk,id=,node-name=,\n" +" addr.type=unix,addr.path=[,writable=on|off]\n" +" [,logical-block-size=][,num-queues=]\n" +" export the specified block node as a\n" +" vhosts-user-blk device over UNIX domain socket\n" +" --export [type=]vhost-user-blk,id=,node-name=,\n" +" fd,addr.str=[,writable=on|off]\n" +" [,logical-block-size=][,num-queues=]\n" +" export the specified block node as a\n" +" vhosts-user-blk device over file descriptor\n" +"\n" +#endif /* CONFIG_VHOST_USER_BLK_SERVER */ " --monitor [chardev=]name[,mode=control][,pretty[=on|off]]\n" " configure a QMP monitor\n" "\n" From patchwork Mon Dec 20 20:00:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12688473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9978FC433FE for ; Mon, 20 Dec 2021 20:03:44 +0000 (UTC) Received: from localhost ([::1]:33672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzOsp-000495-1a for qemu-devel@archiver.kernel.org; Mon, 20 Dec 2021 15:03:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzOq3-0001pq-V5 for qemu-devel@nongnu.org; Mon, 20 Dec 2021 15:01:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzOq2-00038p-GU for qemu-devel@nongnu.org; Mon, 20 Dec 2021 15:00:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640030449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Esu57sWgC3/UQ9aIRkG9aAmymu76n4chXDeJH006p+M=; b=Qb0GWWFKxYpk/9DZL2mvlOdbttokt6kH4xmSmEhhiLJF/b0bLOjEsjkTW2JrnogaU1OMpV a0rxthblcvCgD1sY5UCPtrFLNrMSxUx0uxqQz2XNcjSV01/mtgnrEIcigsblBr1kkaO+Pp wXM5jHL+EdZb1niiP7c9oK0RIXpSK5w= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-618--VZgZtzGMVCNy_eQ9VbWUw-1; Mon, 20 Dec 2021 15:00:48 -0500 X-MC-Unique: -VZgZtzGMVCNy_eQ9VbWUw-1 Received: by mail-wm1-f72.google.com with SMTP id a203-20020a1c7fd4000000b0034574187420so74006wmd.5 for ; Mon, 20 Dec 2021 12:00:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Esu57sWgC3/UQ9aIRkG9aAmymu76n4chXDeJH006p+M=; b=YmWP4zSjgKv8a83DH30/S0F0ONmzpis77O/TuwLMasjEI34QsgEJFiuX0mEtaMjMO7 xO+6xn9Kh8r6kTzU+eemtGnrWur9iNAYYtX9ZZRJS740iFiGnPeAZgH6gWHxNTrtC8TH HSw66Yv90L3/LJDMe+8GY+2pB8yRHrvLcgf1wyrW6uu29V4Lg0auiRpz/0P2wjwdFmYg arPQNT0wUYBuySdJKK/BfEl2RIjMCwX1trUOqiwQ8N7dIUczEOn6hJYJHe26AZENlSMI Gq++pV+WRurFqfGbY5JFLwsBoDw9LKXYwnYSLpvxM/M/ATq2kYsouc6/XEOMt9fQEU9b yhlA== X-Gm-Message-State: AOAM531Db4A0YjiWTsrqPYXBhR+1JdyDxzJEXML1lHxufGOpqd7UqqYD SPDz/tYaksvLZhggEd1S8iDtuHX3sQM9pRCAp07fgEDewAZXmAwM0euerXf6otqgxLho3nvkicb PB5xnxyu68aK0VTSDvVI21WvfpZj8uSLJIMRb3PXMJ1p2L8crmJCuAytMUADy2p2f X-Received: by 2002:adf:a489:: with SMTP id g9mr13714446wrb.235.1640030446690; Mon, 20 Dec 2021 12:00:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwh8PZDOsTg1dJfgmw/yZ8CXrnCyp7RYaLkni4pwgCEeO435V/b2DV3M1GuSMwTV9W4JxiQ9w== X-Received: by 2002:adf:a489:: with SMTP id g9mr13714428wrb.235.1640030446532; Mon, 20 Dec 2021 12:00:46 -0800 (PST) Received: from x1w.redhat.com (174.red-83-50-185.dynamicip.rima-tde.net. [83.50.185.174]) by smtp.gmail.com with ESMTPSA id f6sm371074wmq.6.2021.12.20.12.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 12:00:46 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/2] qapi/block: Restrict vhost-user-blk to CONFIG_VHOST_USER_BLK_SERVER Date: Mon, 20 Dec 2021 21:00:34 +0100 Message-Id: <20211220200034.2233987-3-philmd@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211220200034.2233987-1-philmd@redhat.com> References: <20211220200034.2233987-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.209, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Eric Blake , Markus Armbruster , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Do not list vhost-user-blk in BlockExportType when CONFIG_VHOST_USER_BLK_SERVER is disabled. Fixes: 90fc91d50b7 ("convert vhost-user-blk server to block export API") Signed-off-by: Philippe Mathieu-Daudé --- qapi/block-export.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qapi/block-export.json b/qapi/block-export.json index c1b92ce1c1c..6bc29a75dc0 100644 --- a/qapi/block-export.json +++ b/qapi/block-export.json @@ -277,7 +277,8 @@ # Since: 4.2 ## { 'enum': 'BlockExportType', - 'data': [ 'nbd', 'vhost-user-blk', + 'data': [ 'nbd', + { 'name': 'vhost-user-blk', 'if': 'CONFIG_VHOST_USER_BLK_SERVER' }, { 'name': 'fuse', 'if': 'CONFIG_FUSE' } ] } ##