From: "Darrick J. Wong" <djwong@kernel.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Vivek Goyal <vgoyal@redhat.com>,
Dave Chinner <david@fromorbit.com>,
JeffleXu <jefflexu@linux.alibaba.com>,
Theodore Ts'o <tytso@mit.edu>,
adilger.kernel@dilger.ca, ira.weiny@intel.com,
linux-xfs@vger.kernel.org,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
linux-fsdevel@vger.kernel.org, dan.j.williams@intel.com,
Christoph Hellwig <hch@lst.de>,
Dave Chinner <dchinner@redhat.com>
Subject: Re: [Question] ext4/xfs: Default behavior changed after per-file DAX
Date: Thu, 28 Oct 2021 09:42:36 -0700 [thread overview]
Message-ID: <20211028164236.GD24307@magnolia> (raw)
In-Reply-To: <ef95af19-4b0a-61e8-5dfa-3e223118da8e@sandeen.net>
On Thu, Oct 28, 2021 at 11:29:08AM -0500, Eric Sandeen wrote:
> On 10/27/21 8:14 AM, Vivek Goyal wrote:
> > On Wed, Oct 27, 2021 at 09:33:17AM +1100, Dave Chinner wrote:
>
> ...
>
> > Hi Dave,
> >
> > Thanks for all the explanaiton and background. It helps me a lot in
> > wrapping my head around the rationale for current design.
> >
> > > It's perfectly reasonable. If the hardware doesn't support DAX, then
> > > we just always behave as if dax=never is set.
> >
> > I tried mounting non-DAX block device with dax=always and it failed
> > saying DAX can't be used with reflink.
> >
> > [ 100.371978] XFS (vdb): DAX unsupported by block device. Turning off DAX.
> > [ 100.374185] XFS (vdb): DAX and reflink cannot be used together!
> >
> > So looks like first check tried to fallback to dax=never as device does
> > not support DAX. But later reflink check thought dax is enabled and
> > did not fallback to dax=never.
>
> We need to think hard about this stuff and audit it to be sure.
>
> But, I think that reflink check should probably just be removed, now that
> DAX files and reflinked files can co-exist on a filesystem - it's just
> that they can't both be active on the /same file/.
>
> I think that even "dax=always" is still just "advisory" - it means,
> try to enable dax on every file. It may still fail in the same ways as
> dax=inode (default) + flag set may fail.
>
> But ... we should go through the whole mount option / feature set /
> device capability logic to be sure this is all consistent. Thanks for
> pointing it out!
I was rather hoping that we'd solve this problem by helping Shiyang get
his two patchsets landed, and then we can eliminate the dax+reflink
check entirely.
[1] (dax poison notifications via rmap V7)
https://lore.kernel.org/linux-xfs/20210924130959.2695749-1-ruansy.fnst@fujitsu.com/
[2] (reflink + dax V10)
https://lore.kernel.org/linux-xfs/20210928062311.4012070-1-ruansy.fnst@fujitsu.com/
(The second patchset is AFAICT ready to go, but we still need to iron
out the difficulties pointed out in the last review of patchset #1)
--D
> -Eric
>
> > > IO
next prev parent reply other threads:[~2021-10-28 16:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 14:12 [Question] ext4/xfs: Default behavior changed after per-file DAX JeffleXu
2021-10-26 15:48 ` Darrick J. Wong
2021-10-26 19:25 ` Vivek Goyal
2021-10-26 20:57 ` Ira Weiny
2021-10-27 14:36 ` Vivek Goyal
2021-10-28 5:52 ` JeffleXu
2021-10-28 13:01 ` Vivek Goyal
2021-10-28 18:24 ` Ira Weiny
2021-10-28 19:19 ` Vivek Goyal
2021-10-26 22:33 ` Dave Chinner
2021-10-27 13:14 ` Vivek Goyal
2021-10-28 16:29 ` Eric Sandeen
2021-10-28 16:42 ` Darrick J. Wong [this message]
2021-10-27 2:52 ` JeffleXu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211028164236.GD24307@magnolia \
--to=djwong@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=dchinner@redhat.com \
--cc=hch@lst.de \
--cc=ira.weiny@intel.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
--cc=tytso@mit.edu \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).