From patchwork Thu Mar 1 05:38:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 10250587 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 BB3DB60211 for ; Thu, 1 Mar 2018 09:12:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEE5728C87 for ; Thu, 1 Mar 2018 09:12:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A391628D71; Thu, 1 Mar 2018 09:12:55 +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 1F96428C87 for ; Thu, 1 Mar 2018 09:12:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE5FE7FDC0; Thu, 1 Mar 2018 09:12:53 +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 8D3FA189B4; Thu, 1 Mar 2018 09:12:53 +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 555D34A46D; Thu, 1 Mar 2018 09:12:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w215cckd024122 for ; Thu, 1 Mar 2018 00:38:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id DFF5D60C4E; Thu, 1 Mar 2018 05:38:38 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA9EA60BE7 for ; Thu, 1 Mar 2018 05:38:35 +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 D4AD85F742 for ; Thu, 1 Mar 2018 05:38:33 +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 22:38:27 -0700 From: Qu Wenruo To: fstests@vger.kernel.org Date: Thu, 1 Mar 2018 13:38:21 +0800 Message-Id: <20180301053821.18718-3-wqu@suse.com> In-Reply-To: <20180301053821.18718-1-wqu@suse.com> References: <20180301053821.18718-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.39]); Thu, 01 Mar 2018 05:38:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 01 Mar 2018 05:38:34 +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.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Thu, 01 Mar 2018 04:12:01 -0500 Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 2/2] fstests: 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 01 Mar 2018 09:12:54 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Qu Wenruo --- src/log-writes/log-writes.c | 3 ++- src/log-writes/log-writes.h | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/log-writes/log-writes.c b/src/log-writes/log-writes.c index 181dabf442de..168fea905ef3 100644 --- a/src/log-writes/log-writes.c +++ b/src/log-writes/log-writes.c @@ -130,7 +130,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/src/log-writes/log-writes.h b/src/log-writes/log-writes.h index 35ca35838aac..75fb8ac0bf79 100644 --- a/src/log-writes/log-writes.h +++ b/src/log-writes/log-writes.h @@ -20,10 +20,11 @@ typedef __u32 u32; /* * Constants copied from kernel file drivers/md/dm-log-writes.c */ -#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