From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] xfs: don't catch dax+reflink inodes as corruption in verifier
Date: Thu, 3 Dec 2020 13:44:36 -0800 [thread overview]
Message-ID: <20201203214436.GA629293@magnolia> (raw)
In-Reply-To: <4b655a26-0e3c-3da7-2017-6ed88a46a611@redhat.com>
On Tue, Dec 01, 2020 at 01:16:09PM -0600, Eric Sandeen wrote:
> We don't yet support dax on reflinked files, but that is in the works.
>
> Further, having the flag set does not automatically mean that the inode
> is actually "in the CPU direct access state," which depends on several
> other conditions in addition to the flag being set.
>
> As such, we should not catch this as corruption in the verifier - simply
> not actually enabling S_DAX on reflinked files is enough for now.
>
> Fixes: 4f435ebe7d04 ("xfs: don't mix reflink and DAX mode for now")
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> fs/xfs/libxfs/xfs_inode_buf.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
> index c667c63f2cb0..4d7410e49db4 100644
> --- a/fs/xfs/libxfs/xfs_inode_buf.c
> +++ b/fs/xfs/libxfs/xfs_inode_buf.c
> @@ -547,10 +547,6 @@ xfs_dinode_verify(
> if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags & XFS_DIFLAG_REALTIME))
> return __this_address;
>
> - /* don't let reflink and dax mix */
> - if ((flags2 & XFS_DIFLAG2_REFLINK) && (flags2 & XFS_DIFLAG2_DAX))
> - return __this_address;
If we're going to let in inodes with the DAX and REFLINK iflags set,
doesn't that mean that xfs_inode_should_enable_dax needs to return false
if REFLINK is set?
--D
> -
> /* COW extent size hint validation */
> fa = xfs_inode_validate_cowextsize(mp, be32_to_cpu(dip->di_cowextsize),
> mode, flags, flags2);
> --
> 2.17.0
>
next prev parent reply other threads:[~2020-12-03 21:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 19:10 [PATCH 0/2] xfs: fix up some reflink+dax interactions Eric Sandeen
2020-12-01 19:16 ` [PATCH 1/2] xfs: don't catch dax+reflink inodes as corruption in verifier Eric Sandeen
2020-12-02 10:16 ` Christoph Hellwig
2020-12-03 21:44 ` Darrick J. Wong [this message]
2020-12-03 22:19 ` Eric Sandeen
2020-12-03 23:03 ` Darrick J. Wong
2020-12-01 19:20 ` [RFC PATCH 2/2] xfs: do not allow reflinking inodes with the dax flag set Eric Sandeen
2020-12-02 10:22 ` Christoph Hellwig
2020-12-02 14:44 ` Eric Sandeen
2020-12-02 17:15 ` Christoph Hellwig
2020-12-02 17:15 ` Christoph Hellwig
2020-12-01 19:23 ` [PATCH 0/2] xfs: fix up some reflink+dax interactions Eric Sandeen
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=20201203214436.GA629293@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@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