Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3177902ybb; Mon, 13 Apr 2020 02:22:39 -0700 (PDT) X-Google-Smtp-Source: APiQypJj5WvpB1WoGqIF8JXWLgCG7YnSwDV/DMf2huWiT+OWTCc2lXxlaluTp2UCrvWIz8biB1e9 X-Received: by 2002:aa7:d581:: with SMTP id r1mr15851320edq.335.1586769759049; Mon, 13 Apr 2020 02:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586769759; cv=none; d=google.com; s=arc-20160816; b=w8RxA5cg5zPD8W5kXJCVNFoDcnsh6BLK9vN+xPKyCQ8NaazRnnCdDJDaGavR0FlKEv Bc9NyulmVbkdnyvhjALqhiUwp6Db/SQseAdZ7y22hvjuvLr4y62kiOhDGHlHqFMCdNCH RaaGqplH5cjjPaSYPdUY+gtczcH0fj4LN3mIMLB/o/cLtB/VIXw4KplALzfz0kyxZPFV bzdKHnIk9QDmFPa+Vr7eUQ32No7tXz1Ws3ru2kttc1emPSpA7I42e1cDYQ18StTwWMs+ iTQzzLu/zTklug/cDhfgHbW2pk2U/RMdMoggDFTVto1D/vn80L4+aYfte6dnGaE2jguU d64w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Fxdds2vPGS3N/102R6ExV/SBHS+w/11kI+QRFuDnruo=; b=IyEQBzG0G3AuFo2nzNg5xKrWR2q20hS+QDjn8PyAI3Aa7JgiSZv6XWE8LS8wyKOWeF qOrT3VTeGsUBX9+RG6Bn9PFKVpQvfgZXw7JX4z/fd8uqbhJF2zuSVGbjNjSQqP+3mIF4 GBih1ZcGVKTjlpuuXigRpq2vr+pdO3SRbvasvcr7BJ8IYUbivCGLS4f2eK/59207IhiY II+tYKK0k4rVlIZv06zE5JfMGahz9o9BZkfMJvtG/B5KFn1Tr3ZoFXpAmXlpaEsa07GG z/i2NI8LIxjmYWXMDxi1amoYN0OJOqQDS+SNEJ5rUlICngSbVQr1CfEpqrgvkfwPkTdh 5u4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LdKv4Bhm; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k6si6110820ejv.507.2020.04.13.02.22.09; Mon, 13 Apr 2020 02:22:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LdKv4Bhm; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729519AbgDMHyt (ORCPT + 99 others); Mon, 13 Apr 2020 03:54:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.18]:37460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727480AbgDMHys (ORCPT ); Mon, 13 Apr 2020 03:54:48 -0400 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A9AEC008651; Mon, 13 Apr 2020 00:54:48 -0700 (PDT) Received: by mail-io1-xd43.google.com with SMTP id n10so8549276iom.3; Mon, 13 Apr 2020 00:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fxdds2vPGS3N/102R6ExV/SBHS+w/11kI+QRFuDnruo=; b=LdKv4BhmbHJcCbUnqYd7/INd7IRPACwNoGsA+AW7nLT9uuV9rGvs/8favMyv1eZwZZ Wyw02zFL0pMC6j02qV9kT8QSNqmPtZ10h7PFXbT5HN15zveOABgeIRuO25KBGTEdiAT1 x+fL0JFJrzeYbeZskSJBRrxUz3qFqTNh86hPJVMHDz5cFc/H0OUTRTSN1i00o0YbK5wg XpCljmKRIw2wEprR1kjab0mzXG0jJFavEUlRlUG4TUbxOD+R8DiHgf30ZT34el3EHw2k WezgSHoiZfzKq6GQ3QX2pLsJDeZo5ptLjwoLtpAqUVAQyp/ljQwCsFR9EJAXAOz02qpj AEvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fxdds2vPGS3N/102R6ExV/SBHS+w/11kI+QRFuDnruo=; b=mbber3RmO5vEhbxW1IBgM9Jl5yljeevnkMJFINzNL2XETtYiF3Ta9oUBu70I1whvAy OstmP4E7+LWiJ4Z6o2bgOqhoiCii26I+PxjLZ0o/2gDIPWSL8xesTxmZxPTFTerAt5ws qUzeY9mahyXCWod6UblpXXLKQhl24oL+QYEqVlKRW58hNIonbVkFI9KQ2cn0N4B/q8um mbV9lONA8PksUgPR0sB4rU2C+Ff2jzsfYyJbJGEdihSGGBoGV1w331+Klz64l3AuhvvJ 3kaT4JTp2FNtwv7Pno+ya1FlbntLgo2/Z/58uC5KeM77+5gZIE3yPYwYKxeq7WJGxXEc qH+g== X-Gm-Message-State: AGi0PuaGv8VKBDV3LNBHF9VSVWIEorJu6QTCGH9stP8Oxdz+iYm1/qz4 H9JPPRniiWrCUb9wBLcaYuQBzbrJeEO5wk+pPt8= X-Received: by 2002:a05:6602:1302:: with SMTP id h2mr15261121iov.186.1586764487632; Mon, 13 Apr 2020 00:54:47 -0700 (PDT) MIME-Version: 1.0 References: <20200413054419.1560503-1-ira.weiny@intel.com> In-Reply-To: <20200413054419.1560503-1-ira.weiny@intel.com> From: Amir Goldstein Date: Mon, 13 Apr 2020 10:54:36 +0300 Message-ID: Subject: Re: [PATCH] xfs/XXX: Add xfs/XXX To: ira.weiny@intel.com Cc: fstests , linux-kernel , "Darrick J. Wong" , Dan Williams , Dave Chinner , Christoph Hellwig , "Theodore Y. Ts'o" , Jan Kara , Jeff Moyer , Ext4 , linux-xfs , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Apr 13, 2020 at 9:06 AM wrote: > > From: Ira Weiny > > Add XXX to test per file DAX operations. Please change commit title to "xfs: Add test for per file DAX operations" The title Add xfs/XXX is not useful even if XXX where a number. But the kernel patch suggests that there is an intention to make this behavior also applicable to ext4?? If that is the case I would recommend making this a generic tests which requires filesystem support for -o dax=XXX > > The following is tested[*] > > 1. There exists an in-kernel access mode flag S_DAX that is set when > file accesses go directly to persistent memory, bypassing the page > cache. Applications must call statx to discover the current S_DAX > state (STATX_ATTR_DAX). > > 2. There exists an advisory file inode flag FS_XFLAG_DAX that is > inherited from the parent directory FS_XFLAG_DAX inode flag at file > creation time. This advisory flag can be set or cleared at any > time, but doing so does not immediately affect the S_DAX state. > > Unless overridden by mount options (see (3)), if FS_XFLAG_DAX is set > and the fs is on pmem then it will enable S_DAX at inode load time; > if FS_XFLAG_DAX is not set, it will not enable S_DAX. > > 3. There exists a dax= mount option. > > "-o dax=never" means "never set S_DAX, ignore FS_XFLAG_DAX." > > "-o dax=always" means "always set S_DAX (at least on pmem), > and ignore FS_XFLAG_DAX." > > "-o dax" is an alias for "dax=always". > > "-o dax=inode" means "follow FS_XFLAG_DAX" and is the default. > > 4. There exists an advisory directory inode flag FS_XFLAG_DAX that can > be set or cleared at any time. The flag state is copied into any > files or subdirectories when they are created within that directory. > > 5. Programs that require a specific file access mode (DAX or not DAX) > can do one of the following: > > (a) Create files in directories that the FS_XFLAG_DAX flag set as > needed; or > > (b) Have the administrator set an override via mount option; or > > (c) Set or clear the file's FS_XFLAG_DAX flag as needed. Programs > must then cause the kernel to evict the inode from memory. This > can be done by: > > i> Closing the file and re-opening the file and using statx to > see if the fs has changed the S_DAX flag; and > > ii> If the file still does not have the desired S_DAX access > mode, either unmount and remount the filesystem, or close > the file and use drop_caches. > > 6. It's not unreasonable that users who want to squeeze every last bit > of performance out of the particular rough and tumble bits of their > storage also be exposed to the difficulties of what happens when the > operating system can't totally virtualize those hardware > capabilities. Your high performance sports car is not a Toyota > minivan, as it were. > > [*] https://lore.kernel.org/lkml/20200409165927.GD6741@magnolia/ > > Signed-off-by: Ira Weiny > > --- > Changes from v6 (kernel patch set): > Start versions tracking the kernel patch set. > Update for new requirements > > Changes from V1 (xfstests patch): > Add test to ensure moved files preserve their flag > Check chattr of non-dax flags (check bug found by Darrick) > --- ... > --- a/tests/xfs/group > +++ b/tests/xfs/group > @@ -511,3 +511,4 @@ > 511 auto quick quota > 512 auto quick acl attr > 513 auto mount > +999 auto The test looks also 'quick' Thanks, Amir.