@@ -3221,10 +3221,23 @@ _check_s_dax()
local exp_s_dax=$2
local attributes=$($XFS_IO_PROG -c 'statx -r' $target | awk '/stat.attributes / { print $3 }')
- if [ $exp_s_dax -eq 0 ]; then
- (( attributes & 0x2000 )) && echo "$target has unexpected S_DAX flag"
+
+ # The attribute bit value, STATX_ATTR_DAX (0x2000), conflicted with
+ # STATX_ATTR_MOUNT_ROOT. Therefore, STATX_ATTR_DAX was changed to
+ # 0x00200000.
+ #
+ # Because DAX tests do not run on root mounts, STATX_ATTR_MOUNT_ROOT
+ # should always be 0, therefore we can allow either bit to indicate DAX
+ # and cover any kernel which may be running.
+
+ if [ $(( attributes & 0x00200000 )) -ne 0 ] || [ $(( attributes & 0x2000 )) -ne 0 ]; then
+ if [ $exp_s_dax -eq 0 ]; then
+ echo "$target has unexpected S_DAX flag"
+ fi
else
- (( attributes & 0x2000 )) || echo "$target doesn't have expected S_DAX flag"
+ if [ $exp_s_dax -ne 0 ]; then
+ echo "$target doesn't have expected S_DAX flag"
+ fi
fi
}