Thread (4 messages) 4 messages, 3 authors, 2020-12-02
STALE2048d

[RFC PATCH] common/rc: Fix _check_s_dax() for kernel 5.10

From: <hidden>
Date: 2020-12-02 16:07:51
Also in: fstests, linux-fsdevel, linux-xfs, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

From: Ira Weiny <redacted>

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

Adjust _check_s_dax() to use the new bit.

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

Signed-off-by: Ira Weiny <redacted>

---

I'm not seeing an easy way to check for kernel version.  It seems like that is
the right thing to do.  So do I need to do that by hand or is that something
xfstests does not worry about?

Ira

---
 common/rc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/rc b/common/rc
index b5a504e0dcb4..3d45e233954f 100644
--- a/common/rc
+++ b/common/rc
@@ -3222,9 +3222,9 @@ _check_s_dax()
 
 	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"
+		(( attributes & 0x00200000 )) && echo "$target has unexpected S_DAX flag"
 	else
-		(( attributes & 0x2000 )) || echo "$target doesn't have expected S_DAX flag"
+		(( attributes & 0x00200000 )) || echo "$target doesn't have expected S_DAX flag"
 	fi
 }
 
-- 
2.28.0.rc0.12.gb6a658bd00c9
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help