Bug 2226900

Summary: mkfs.xfs(8): Update section on dax+reflink compatibility
Product: Red Hat Enterprise Linux 9 Reporter: Eric Sandeen <esandeen>
Component: xfsprogsAssignee: Pavel Reichl <preichl>
Status: VERIFIED --- QA Contact: xiaoli feng <xifeng>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: billodo, cmaiolin, preichl, xzhou, zlang
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xfsprogs-5.19.0-4.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Sandeen 2023-07-26 21:46:38 UTC
The current version of the mkfs.xfs man page in RHEL9 (and upstream) contains this caveat:

> Note: the filesystem DAX mount option ( -o dax ) is incompatible with reflink-enabled XFS filesystems.  To use  filesystem DAX with XFS, specify the -m reflink=0 option to mkfs.xfs to disable the reflink feature.

This is no longer the case upstream, and with the updates in kernel bug #2192730 it is no longer the case for RHEL9.

We need to send a patch upstream to address this, probably mentioning the kernel version which added dax+reflink support, and add a similar patch to RHEL9.

Thanks,
-Eric

Comment 1 Eric Sandeen 2023-08-01 01:01:42 UTC
The patch to fix this upstream has been sent to the xfs mailing list, and was reviewed by Darrick.

Carlos, if you approve of the change as well, getting it to for-next would be a good next step so that we can backport it to RHEL9.3 fairly soon.

Thanks,
-Eric

Comment 5 Bill O'Donnell 2023-08-02 13:33:09 UTC
Yes, please!

Comment 6 Pavel Reichl 2023-08-02 14:09:20 UTC
Back porting: 780e93c5 mkfs.xfs.8: correction on mkfs.xfs manpage since reflink and dax are compatible

Comment 9 xiaoli feng 2023-08-04 04:59:19 UTC
Find this info in mkfs.xfs of xfsprogs-5.19.0-3.el9.x86_64.
[root@dell-per750-43 xfstests-dev]# rpm -qa xfsprogs
xfsprogs-5.19.0-3.el9.x86_64
[root@dell-per750-43 ~]# man mkfs.xfs |grep -A 2 -i dax
                          Note:  the  filesystem  DAX mount option ( -o dax ) is incompatible with reflink-enabled XFS filesystems.  To use filesystem DAX
                          with XFS, specify the -m reflink=0 option to mkfs.xfs to disable the reflink feature.

--
                   daxinherit=value
                          If value is set to 1, all inodes created by mkfs.xfs will be created with the DAX flag set.  The default is 0.  Directories will
                          pass on this flag to newly created regular files and directories.  By default, mkfs.xfs will not enable DAX mode.

       -f     Force overwrite when an existing filesystem is detected on the device.  By default, mkfs.xfs will not write to the  device  if  it  suspects



Verify on xfsprogs-5.19.0-4.el9
[root@dell-per750-43 ~]# man mkfs.xfs |grep -A 2 -i dax
                   daxinherit=value
                          If value is set to 1, all inodes created by mkfs.xfs will be created with the DAX flag set.  The default is 0.  Directories will
                          pass on this flag to newly created regular files and directories.  By default, mkfs.xfs will not enable DAX mode.

       -f     Force  overwrite  when  an  existing filesystem is detected on the device.  By default, mkfs.xfs will not write to the device if it suspects
[root@dell-per750-43 ~]# rpm -qa xfsprogs
xfsprogs-5.19.0-4.el9.x86_64