Skip to contentSkip to conversation

overlay: support timestamp range check

PATCH In review Amir Goldstein 2 participants 2 messages Nov 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 overlay: support timestamp range check

Overlayfs timestamp range is the same as base fs timestamp range

---

Eryu,

This change will cause the test to start running and failing on upstream kernel with overlayfs over some fs (e.g. xfs/ext4).

The kernel fix is posted:
https://lore.kernel.org/linux-fsdevel/[email protected]/T/#u

Thanks,
Amir.

 common/rc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
common/rc +9 -1
index b988e912..e5535279 100644
@@ -1978,13 +1978,14 @@ _require_timestamp_range()
 _filesystem_timestamp_range()
 {
 	local device=${1:-$TEST_DEV}
+	local fstyp=${2:-$FSTYP}
 	u32max=$(((1<<32)-1))
 	s32min=-$((1<<31))
 	s32max=$(((1<<31)-1))
 	s64max=$(((1<<63)-1))
 	s64min=$((1<<63))
 
-	case $FSTYP in
+	case $fstyp in
 	ext2)
 		echo "$s32min $s32max"
 		;;
@@ -2005,6 +2006,13 @@ _filesystem_timestamp_range()
 	btrfs)
 		echo "$s64min $s64max"
 		;;
+	overlay)
+		if [ ! -z $OVL_BASE_FSTYP -a $OVL_BASE_FSTYP != "overlay" ]; then
+			_filesystem_timestamp_range $OVL_BASE_TEST_DEV $OVL_BASE_FSTYP
+		else
+			echo "-1 -1"
+		fi
+		;;
 	*)
 		echo "-1 -1"
 		;;
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Amir Goldstein

Overlayfs timestamp range is the same as base fs timestamp range

---

Quoted 7 lines

Eryu,

This change will cause the test to start running and failing on upstream kernel with overlayfs over some fs (e.g. xfs/ext4).

The kernel fix is posted:
https://lore.kernel.org/linux-fsdevel/[email protected]/T/#u

The patch seems ok to me.