From: Eric Sandeen <sandeen@redhat.com>
To: linux-xfs <linux-xfs@vger.kernel.org>
Cc: Jeff Moyer <jmoyer@redhat.com>
Subject: [PATCH] xfs: reject per-inode dax flag on reflink filesystems
Date: Wed, 17 Oct 2018 17:20:56 -0500 [thread overview]
Message-ID: <c1ad993d-5330-88c3-b859-06e33dcd75d8@redhat.com> (raw)
Today we reject this flag on an already-reflinked inode, but we really
need to reject it for any inode on a reflink-capable filesystem until
reflink+dax is supported.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
(um, do we need to catch this when reading from disk as well? If we
found a dax-flagged inode on a reflinked fs, then what would we do with it?)
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 0ef5ece5634c..63d579c652f2 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1031,8 +1031,9 @@ xfs_ioctl_setattr_xflags(
if ((fa->fsx_xflags & FS_XFLAG_REALTIME) && xfs_is_reflink_inode(ip))
ip->i_d.di_flags2 &= ~XFS_DIFLAG2_REFLINK;
- /* Don't allow us to set DAX mode for a reflinked file for now. */
- if ((fa->fsx_xflags & FS_XFLAG_DAX) && xfs_is_reflink_inode(ip))
+ /* Don't allow us to set DAX mode on a reflink filesystem for now. */
+ if ((fa->fsx_xflags & FS_XFLAG_DAX) &&
+ xfs_sb_version_hasreflink(&ip->i_mount->m_sb))
return -EINVAL;
/*
next reply other threads:[~2018-10-18 6:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 22:20 Eric Sandeen [this message]
2018-10-17 22:30 ` [PATCH] xfs: reject per-inode dax flag on reflink filesystems Darrick J. Wong
2018-10-17 22:49 ` Eric Sandeen
2018-10-17 23:03 ` 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=c1ad993d-5330-88c3-b859-06e33dcd75d8@redhat.com \
--to=sandeen@redhat.com \
--cc=jmoyer@redhat.com \
--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