From patchwork Thu Oct 4 13:17:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev" X-Patchwork-Id: 10626183 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 5AD441515 for ; Thu, 4 Oct 2018 13:37:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D07628D14 for ; Thu, 4 Oct 2018 13:37:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 418872915B; Thu, 4 Oct 2018 13:37:10 +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 D3E2628D14 for ; Thu, 4 Oct 2018 13:37:09 +0000 (UTC) Received: from localhost ([::1]:55875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g83oT-0007eW-72 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 04 Oct 2018 09:37:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g83aZ-00035Y-8L for qemu-devel@nongnu.org; Thu, 04 Oct 2018 09:22:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g83VA-0001Xs-UT for qemu-devel@nongnu.org; Thu, 04 Oct 2018 09:17:18 -0400 Received: from relay.sw.ru ([185.231.240.75]:45784) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g83VA-0001XT-MJ for qemu-devel@nongnu.org; Thu, 04 Oct 2018 09:17:12 -0400 Received: from [172.16.24.44] (helo=iris.sw.ru) by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from ) id 1g83V5-0001eP-Ky; Thu, 04 Oct 2018 16:17:07 +0300 From: "Denis V. Lunev" To: qemu-devel@nongnu.org Date: Thu, 4 Oct 2018 16:17:39 +0300 Message-Id: <20181004131739.11053-1-den@openvz.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <558261af-914a-1ea4-ef21-c7654a50284e@virtuozzo.com> References: <558261af-914a-1ea4-ef21-c7654a50284e@virtuozzo.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH 2/2] nbd: add all possible transmission flags supported by NBD 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: den@openvz.org, Vladimir Sementsov-Ogievskiy , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is done to avoid silly mistakes like one with wrong value of NBD_FLAG_SEND_CACHE flag. Signed-off-by: Denis V. Lunev CC: Vladimir Sementsov-Ogievskiy CC: Eric Blake CC: Paolo Bonzini --- include/block/nbd.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/block/nbd.h b/include/block/nbd.h index 4377fa502c..ea8e792de0 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -135,6 +135,9 @@ typedef struct NBDExtent { #define NBD_FLAG_SEND_TRIM (1 << 5) /* Send TRIM (discard) */ #define NBD_FLAG_SEND_WRITE_ZEROES (1 << 6) /* Send WRITE_ZEROES */ #define NBD_FLAG_SEND_DF (1 << 7) /* Send DF (Do not Fragment) */ +#define NBD_FLAG_CAN_MULTI_CONN (1 << 8) /* Shared cache over multiple + connections per export */ +#define NBD_FLAG_SEND_RESIZE (1 << 9) /* Support RESIZE extension */ #define NBD_FLAG_SEND_CACHE (1 << 10) /* Send CACHE (prefetch) */ /* New-style handshake (global) flags, sent from server to client, and