Received: by 10.223.164.202 with SMTP id h10csp310334wrb; Fri, 17 Nov 2017 00:42:06 -0800 (PST) X-Google-Smtp-Source: AGs4zMZfAHGOUGR8cTgyR8lon0Fp4ieC3z2hTD+Dqb7Xj2TzpfX2GpOT32t+GGVxBXBeiUlP2G2i X-Received: by 10.84.175.3 with SMTP id s3mr4482819plb.440.1510908126668; Fri, 17 Nov 2017 00:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510908126; cv=none; d=google.com; s=arc-20160816; b=fjTz0ccWsK6cQunUQwPQmlIc2lb0WMRBdPCgifJjRywoG5khdWB7uyv7fzw0oq4wz3 DMO4oIROWNrr78mzSUMuAJ35PgqVRR0fYIMPJcxwjWevcmnQHSL6RTiF4OoMvXas/rAy m6BuLKo7/qenDoRRcpr03YR6tu37EwisAuM4rCDbhzSHxl2UKhUPWuflxQw0JB0lmzrf FtYXDmQnd/6/FJnBi7SzWNc4moYw9CHpfqIAM+GFpKhbwS1f9owQUsKqHgBXI2Q1YYux dPrLR0OqgEG+zoKgOkSF1qSsh45wylo3B8Vd0ncCXK6/PjxJ/ozja5gdLN2HtJmlr0g2 rIPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=r5t1jBTrmVq559lf+4fvyIkb0iDE61BMjZHkvpa6r7c=; b=rHrjPsE7bcVPTaBOc6fmQ6hPr6VTi17GfF7vSLqFNVSQMB3dAikI7nVaIVX73e4jBB Vt6Woj/npubfB+P8Nq/CBDt6KkUV2TQg1nrYWVAecd2esRXX55yZBJ41DM9SKtOF+VI0 qr68sjH9w3p3rSmEuTsHut4dQuJNJJ8G93fsmb0gr/5A0W6C8p9ntayMxj6W0eI1/ma8 zSzilsJzSz2NahhyQ/5Bn0xcxO1JXdq9X/D77d+Rdar0pd0cWFu42irEn6xfpdeJjdiG 5JTZCggeTrk+g+2eqGKeNS4bPHH9xmE5pHAad+AHFcWe90yYt5rQJ+/y6R7Usy+EaktH MHug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si267078plk.55.2017.11.17.00.41.53; Fri, 17 Nov 2017 00:42:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759523AbdKPW76 (ORCPT + 92 others); Thu, 16 Nov 2017 17:59:58 -0500 Received: from mga11.intel.com ([192.55.52.93]:17787 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbdKPW7s (ORCPT ); Thu, 16 Nov 2017 17:59:48 -0500 Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2017 14:59:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,405,1505804400"; d="scan'208";a="177125465" Received: from theros.lm.intel.com (HELO linux.intel.com) ([10.232.112.77]) by fmsmga006.fm.intel.com with ESMTP; 16 Nov 2017 14:59:47 -0800 Date: Thu, 16 Nov 2017 15:59:47 -0700 From: Ross Zwisler To: Amir Goldstein Cc: Ross Zwisler , Josef Bacik , Eryu Guan , fstests , linux-kernel , Alasdair Kergon , Dan Williams , Dave Chinner , Jan Kara , Mike Snitzer , Shaohua Li , dm-devel@redhat.com, linux-nvdimm@lists.01.org, linux-raid@vger.kernel.org, linux-fsdevel , Ext4 , linux-xfs , Christoph Hellwig Subject: Re: [fstests PATCH v3] generic: add test for DAX MAP_SYNC support Message-ID: <20171116225947.GA23070@linux.intel.com> Mail-Followup-To: Ross Zwisler , Amir Goldstein , Josef Bacik , Eryu Guan , fstests , linux-kernel , Alasdair Kergon , Dan Williams , Dave Chinner , Jan Kara , Mike Snitzer , Shaohua Li , dm-devel@redhat.com, linux-nvdimm@lists.01.org, linux-raid@vger.kernel.org, linux-fsdevel , Ext4 , linux-xfs , Christoph Hellwig References: <20171025204704.3382-1-ross.zwisler@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 26, 2017 at 07:59:39AM +0300, Amir Goldstein wrote: > On Wed, Oct 25, 2017 at 11:47 PM, Ross Zwisler > wrote: > > Add a test that exercises DAX's new MAP_SYNC flag. > > > > This test creates a file and writes to it via an mmap(), but never syncs > > via fsync/msync. This process is tracked via dm-log-writes, then replayed. > > > > If MAP_SYNC is working the dm-log-writes replay will show the test file > > with 1MiB of on-media block allocations. This is because each allocating > > page fault included an implicit metadata sync. If MAP_SYNC isn't working > > (which you can test by fiddling with the parameters to mmap()) the file > > will be smaller or missing entirely. > > > > Note that dm-log-writes doesn't track the data that we write via the > > mmap(), so we can't do any data integrity checking. We can only verify > > that the metadata writes for the page faults happened. > > > > Signed-off-by: Ross Zwisler > > > > --- > > > > Changes since v2: > > - Fixed _require_log_writes() so that DAX will be disallowed if the > > version of the dm-log-writes target is older than v1.1.0. (Amir) > > It seems like your kernel patch bumped the version to 1.0.1... Ah, yep, that's the version number that I submitted but Mike changed it to v1.1.0 in his tree. Here's the patch that was merged for v4.15-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers?id=98d82f48f1983ceef5c8d2f6c87bfee2918790ee > > > > --- > > .gitignore | 1 + > > common/dmlogwrites | 4 ++- > > common/rc | 6 ++-- > > src/Makefile | 3 +- > > src/t_map_sync.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++ > > tests/generic/466 | 76 ++++++++++++++++++++++++++++++++++++++++++ > > tests/generic/466.out | 3 ++ > > tests/generic/group | 1 + > > 8 files changed, 182 insertions(+), 4 deletions(-) > > create mode 100644 src/t_map_sync.c > > create mode 100755 tests/generic/466 > > create mode 100644 tests/generic/466.out > > > > diff --git a/.gitignore b/.gitignore > > index 2014c08..9fc0695 100644 > > --- a/.gitignore > > +++ b/.gitignore > > @@ -119,6 +119,7 @@ > > /src/t_getcwd > > /src/t_holes > > /src/t_immutable > > +/src/t_map_sync > > /src/t_mmap_cow_race > > /src/t_mmap_dio > > /src/t_mmap_fallocate > > diff --git a/common/dmlogwrites b/common/dmlogwrites > > index 247c744..71d008d 100644 > > --- a/common/dmlogwrites > > +++ b/common/dmlogwrites > > @@ -23,8 +23,10 @@ _require_log_writes() > > [ -z "$LOGWRITES_DEV" -o ! -b "$LOGWRITES_DEV" ] && \ > > _notrun "This test requires a valid \$LOGWRITES_DEV" > > > > - _exclude_scratch_mount_option dax > > _require_dm_target log-writes > > + if [[ ${DMTARGET_VER[0]} == 1 && ${DMTARGET_VER[1]} < 1 ]]; then > > + _exclude_scratch_mount_option dax > > + fi > > IMO, this would be better as: > > local z=0 > _scratch_has_mount_option dax && z=1 > _require_dm_target log-writes 1 0 $z > > Or something like that Yep, this is nicer. Fixed. Thanks for the review. From 1584273669252950304@xxx Fri Nov 17 01:11:48 +0000 2017 X-GM-THRID: 1581753232979805473 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread