From patchwork Wed Feb 28 07:33:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 10247023 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B51F360212 for ; Wed, 28 Feb 2018 08:51:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A814128C74 for ; Wed, 28 Feb 2018 08:51:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C9D528C77; Wed, 28 Feb 2018 08:51: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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6AE4228C74 for ; Wed, 28 Feb 2018 08:51:42 +0000 (UTC) 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 8C1AE4E906; Wed, 28 Feb 2018 08:51:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5990C60C82; Wed, 28 Feb 2018 08:51:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BFF9B6B543; Wed, 28 Feb 2018 08:51:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1S7XmIN004628 for ; Wed, 28 Feb 2018 02:33:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id C85335D964; Wed, 28 Feb 2018 07:33:48 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C19585D9C8 for ; Wed, 28 Feb 2018 07:33:40 +0000 (UTC) Received: from prv3-mh.provo.novell.com (victor.provo.novell.com [137.65.250.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0251785A07 for ; Wed, 28 Feb 2018 07:33:40 +0000 (UTC) Received: from adam-pc.lan (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (NOT encrypted); Wed, 28 Feb 2018 00:33:30 -0700 From: Qu Wenruo To: dm-devel@redhat.com, jbacik@fb.com Date: Wed, 28 Feb 2018 15:33:26 +0800 Message-Id: <20180228073326.30106-2-wqu@suse.com> In-Reply-To: <20180228073326.30106-1-wqu@suse.com> References: <20180228073326.30106-1-wqu@suse.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 28 Feb 2018 07:33:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 28 Feb 2018 07:33:40 +0000 (UTC) for IP:'137.65.250.26' DOMAIN:'victor.provo.novell.com' HELO:'prv3-mh.provo.novell.com' FROM:'wqu@suse.com' RCPT:'' X-RedHat-Spam-Score: -2.301 (RCVD_IN_DNSWL_MED, SPF_PASS) 137.65.250.26 victor.provo.novell.com 137.65.250.26 victor.provo.novell.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Wed, 28 Feb 2018 03:51:00 -0500 Subject: [dm-devel] [PATCH 2/2] log-writes: Add support for METADATA flag X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com 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.38]); Wed, 28 Feb 2018 08:51:41 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Qu Wenruo --- log-writes.c | 3 ++- log-writes.h | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/log-writes.c b/log-writes.c index 5ef328656c89..651db43383ba 100644 --- a/log-writes.c +++ b/log-writes.c @@ -127,7 +127,8 @@ struct flags_to_str_entry { DEFINE_LOG_FLAGS_STR_ENTRY(FLUSH), DEFINE_LOG_FLAGS_STR_ENTRY(FUA), DEFINE_LOG_FLAGS_STR_ENTRY(DISCARD), - DEFINE_LOG_FLAGS_STR_ENTRY(MARK) + DEFINE_LOG_FLAGS_STR_ENTRY(MARK), + DEFINE_LOG_FLAGS_STR_ENTRY(METADATA) }; #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) diff --git a/log-writes.h b/log-writes.h index 13f98ffe1730..ce41262f6aaa 100644 --- a/log-writes.h +++ b/log-writes.h @@ -12,10 +12,11 @@ extern int log_writes_verbose; typedef __u64 u64; typedef __u32 u32; -#define LOG_FLUSH_FLAG (1 << 0) -#define LOG_FUA_FLAG (1 << 1) -#define LOG_DISCARD_FLAG (1 << 2) -#define LOG_MARK_FLAG (1 << 3) +#define LOG_FLUSH_FLAG (1 << 0) +#define LOG_FUA_FLAG (1 << 1) +#define LOG_DISCARD_FLAG (1 << 2) +#define LOG_MARK_FLAG (1 << 3) +#define LOG_METADATA_FLAG (1 << 4) #define WRITE_LOG_VERSION 1 #define WRITE_LOG_MAGIC 0x6a736677736872