Skip to contentSkip to conversation

generic/622: fix for exfat

PATCH In review Yuezhang Mo 2 participants 2 messages Jun 6, 2025 – Jun 18, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/622: fix for exfat

After commit(f761fcdd289d exfat: Implement sops->shutdown and ioctl), shutdown is supported by exfat, this test can be run, but fails because exfat has a 2 second granularity for access_time and no timestamps for metadata changes.

---
 tests/generic/622 | 7 +++++++
 1 file changed, 7 insertions(+)
tests/generic/622 +7 -0
index 0c744fde..a67931ad 100755
@@ -116,6 +116,9 @@ do_test()
 
 	echo -e "\n# Testing that lazytime $timestamp_type update is persisted by $persist_method"
 
+	# exfat does not support last metadata change timestamp
+	[ "${FSTYP}" == "exfat" -a "${timestamp_type}" == "ctime" ] && return 0
+
 	# Mount the filesystem with lazytime.  If atime is being tested, then
 	# also use strictatime, since otherwise the filesystem may default to
 	# relatime and not do the atime updates.
@@ -128,6 +131,10 @@ do_test()
 	# Update the specified timestamp on the file.
 	local orig_time=$(get_timestamp $timestamp_type)
 	sleep 0.1
+
+	# exfat's timestamp for access_time has double seconds granularity
+	[ "${FSTYP}" == "exfat" -a "${timestamp_type}" == "atime" ] && sleep 2
+
 	case $timestamp_type in
 	atime)
 		# Read from the file to update its atime.
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Yuezhang Mo

After commit(f761fcdd289d exfat: Implement sops->shutdown and ioctl), shutdown is supported by exfat, this test can be run, but fails because exfat has a 2 second granularity for access_time and no timestamps for metadata changes.

---

It's good to me and fix a test failure on my side.

Quoted 31 lines
 tests/generic/622 | 7 +++++++
 1 file changed, 7 insertions(+)
tests/generic/622 +7 -0
index 0c744fde..a67931ad 100755
@@ -116,6 +116,9 @@ do_test()
 
 	echo -e "\n# Testing that lazytime $timestamp_type update is persisted by $persist_method"
 
+	# exfat does not support last metadata change timestamp
+	[ "${FSTYP}" == "exfat" -a "${timestamp_type}" == "ctime" ] && return 0
+
 	# Mount the filesystem with lazytime.  If atime is being tested, then
 	# also use strictatime, since otherwise the filesystem may default to
 	# relatime and not do the atime updates.
@@ -128,6 +131,10 @@ do_test()
 	# Update the specified timestamp on the file.
 	local orig_time=$(get_timestamp $timestamp_type)
 	sleep 0.1
+
+	# exfat's timestamp for access_time has double seconds granularity
+	[ "${FSTYP}" == "exfat" -a "${timestamp_type}" == "atime" ] && sleep 2
+
 	case $timestamp_type in
 	atime)
 		# Read from the file to update its atime.
Signature · 1 line
2.25.1