From patchwork Thu Jan 3 10:18:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongji Xie X-Patchwork-Id: 10747181 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 0FA2B6C5 for ; Thu, 3 Jan 2019 10:23:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F12E027F94 for ; Thu, 3 Jan 2019 10:23:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E278028178; Thu, 3 Jan 2019 10:23: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.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,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 9A2A527F94 for ; Thu, 3 Jan 2019 10:23:49 +0000 (UTC) Received: from localhost ([127.0.0.1]:50436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf0AG-0008I2-R3 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 03 Jan 2019 05:23:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf062-0004M3-AU for qemu-devel@nongnu.org; Thu, 03 Jan 2019 05:19:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gf061-0002wv-Hx for qemu-devel@nongnu.org; Thu, 03 Jan 2019 05:19:26 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:46740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gf061-0002vo-A8 for qemu-devel@nongnu.org; Thu, 03 Jan 2019 05:19:25 -0500 Received: by mail-pg1-x543.google.com with SMTP id w7so15809128pgp.13 for ; Thu, 03 Jan 2019 02:19:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XwarkgJl5t9GVipPy4GZ/zOWp92+r2vb3CtyKc7ZAAc=; b=o+oUPBLi+DOkW6z5nZDDgQcEoKeHVTciy9FFFTT0m8CSIHzqFdq0VvUfm6doj2Nm9k ikn4SsqXiE+2qryvCC9PWDJdBIc79/e1riYNH6CgGJJ45hSBjyttE51dg8ZkFe5nlbDw tKLmQARP/SQdFnFos5kvcAh+ZyMyFpkve4eZP+v9HebmtVNwcDGRP2/dQ23VOmS+FBEH F6M0G4wbdxpZLsIzAGH/yo9W4UKSfX5h44HAJ84/5WIpqBU8/QMIIH2r86yNAbchxqCW /J2rp7D555EYSmBvXLknfoL9gO0Vo+5pxfhFpoqRiXWtNdCln+4P2vWoQ6dHoD6cyvt3 1tHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XwarkgJl5t9GVipPy4GZ/zOWp92+r2vb3CtyKc7ZAAc=; b=DL+NLHVxQrnvVPSJ3YkYM0svF0S+5/ACvVLJc0NDnopTESM/8bI4mfQ5mqLX/xXmWw TUc8YsBpw6DqJaqoKtKr/5IlLHaAApvlTbdb8Lha2Pl66TdyYxzORvr0t8d05/ScdESE 5px3ztwDMLadxrJQ+/BcPp7MYBHiAhwUBqPbKUduNCUP0kEBNjUqkgzh6dJ8YHiZ5sO2 UxpAoQGA31X51Q63+x3MtkkfB8fXbLLkpDv84akKEudnXEE5ICoVOXqfzj4fwQCxBKZt +8Yagl1gfvIcREfpltpqDBQrroQD+vm3JLbLWbWKSZEdWX3FLquNYxqQRlZe7B131lkz o1RA== X-Gm-Message-State: AJcUukfV1BP52idwNtqj8LIUgxd0IU+FVfRMB4gECC3S8AQSIHB2yoFf 4/KoLaPGlFOudT+qKNIDRSpU9tN/ZfM= X-Google-Smtp-Source: ALg8bN5K6QEYFuMuI9rNc9G0XbVtyUofwHs0mFl8/cFguVOmHNtamOoHjnnOI5GcOMLWrgTI9rRQ7A== X-Received: by 2002:a65:5c02:: with SMTP id u2mr16369842pgr.13.1546510763380; Thu, 03 Jan 2019 02:19:23 -0800 (PST) Received: from localhost ([116.247.112.152]) by smtp.gmail.com with ESMTPSA id u186sm83560870pfu.51.2019.01.03.02.19.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Jan 2019 02:19:23 -0800 (PST) From: elohimes@gmail.com X-Google-Original-From: xieyongji@baidu.com To: mst@redhat.com, marcandre.lureau@redhat.com, berrange@redhat.com, jasowang@redhat.com, maxime.coquelin@redhat.com, yury-kotov@yandex-team.ru, wrfsh@yandex-team.ru Date: Thu, 3 Jan 2019 18:18:19 +0800 Message-Id: <20190103101819.7418-8-xieyongji@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190103101819.7418-1-xieyongji@baidu.com> References: <20190103101819.7418-1-xieyongji@baidu.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 Subject: [Qemu-devel] [PATCH v3 for-4.0 7/7] contrib/vhost-user-blk: enable inflight I/O recording 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: nixun@baidu.com, qemu-devel@nongnu.org, lilin24@baidu.com, zhangyu31@baidu.com, chaiwen@baidu.com, Xie Yongji Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Xie Yongji This patch enables inflight I/O recording for vhost-user-blk backend so that we could restart it safely. Signed-off-by: Xie Yongji Signed-off-by: Zhang Yu --- contrib/vhost-user-blk/vhost-user-blk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c index 858221ad95..6d9a417f4a 100644 --- a/contrib/vhost-user-blk/vhost-user-blk.c +++ b/contrib/vhost-user-blk/vhost-user-blk.c @@ -327,7 +327,8 @@ vub_get_features(VuDev *dev) static uint64_t vub_get_protocol_features(VuDev *dev) { - return 1ull << VHOST_USER_PROTOCOL_F_CONFIG; + return 1ull << VHOST_USER_PROTOCOL_F_CONFIG | + 1ull << VHOST_USER_PROTOCOL_F_SLAVE_SHMFD; } static int