common/rc: Fix _check_s_dax()
authorIra Weiny <ira.weiny@intel.com>
Fri, 4 Dec 2020 01:45:50 +0000 (17:45 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 6 Dec 2020 14:15:08 +0000 (22:15 +0800)
commitee4281bfe37c089b970c08a5d665809e8ecb8120
treee8e3229f76a47e5bf3910b3519a3aa3634a8e77f
parent8b4f7e207cb2922168cfe0dadb8cf98c5270c4f7
common/rc: Fix _check_s_dax()

There is a conflict with the user visible statx bits 'mount root' and
'dax'.  The kernel is changing the dax bit to correct this conflict.[1]

Adjust _check_s_dax() to use the new bit.  Because DAX tests do not run
on root mounts, STATX_ATTR_MOUNT_ROOT should always be 0.  Therefore,
check for the old flag and fail the test if that occurs.

[1] https://lore.kernel.org/lkml/3e28d2c7-fbe5-298a-13ba-dcd8fd504666@redhat.com/

Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc