From: Eric Sandeen <sandeen@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [RFC PATCH 2/2] xfs: do not allow reflinking inodes with the dax flag set
Date: Wed, 2 Dec 2020 08:44:24 -0600 [thread overview]
Message-ID: <49e44513-2f52-b221-6c33-e5e7119eb8b9@redhat.com> (raw)
In-Reply-To: <20201202102221.GB19762@infradead.org>
On 12/2/20 4:22 AM, Christoph Hellwig wrote:
> On Tue, Dec 01, 2020 at 01:20:55PM -0600, Eric Sandeen wrote:
>> Today, xfs_reflink_remap_prep() will reject inodes which are in the CPU
>> direct access state, i.e. IS_DAX() is true. However, it is possible to
>> have inodes with the XFS_DIFLAG2_DAX set, but which are not activated as
>> dax, due to the dax=never mount option, or due to the flag being set after
>> the inode was loaded.
>>
>> To avoid confusion and make the lack of dax+reflink crystal clear for the
>> user, reject reflink requests for both IS_DAX and XFS_DIFLAG2_DAX inodes.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> This is RFC because as Darrick says, it introduces a new failure mode for
>> reflink. On the flip side, today the user can reflink a chattr +x'd file,
>> but cannot chattr +x a reflinked file, which seems a best a bit asymmetrical
>> and confusing... see xfs_ioctl_setattr_xflags()
>
> This seems confusing. IMHO for now we should just for non-dax access
> to any reflink file even if XFS_DIFLAG2_DAX is set. The only place
> where we cannot do that is if a file has XFS_DIFLAG2_DAX set and is in
> use and we want to reflink it. Note that "in use" is kinda murky and
> potentially racy. So IMHO not allowing reflink when XFS_DIFLAG2_DAX
> is set and dax=never is not set makes sense, but we should not go
> further.
Hm, trying to parse that...
Would it be correct to restate your last sentence as "Disallowing reflink
when XFS_DIFLAG2_DAX is set and dax=inode is set makes sense?"
If so, then the only change you're suggesting to this patch is to /allow/
reflinking if dax=never is set?
I just figured a very clear statementa bout incompatible flags was simplest,
but I get it that it's overly restrictive, functionally.
Thanks,
-Eric
next prev parent reply other threads:[~2020-12-02 14:46 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
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 [this message]
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=49e44513-2f52-b221-6c33-e5e7119eb8b9@redhat.com \
--to=sandeen@redhat.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
/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).