Skip to contentSkip to conversation

zram01.sh: Fix minimal size for XFS on kernel 5.19

PATCH In review Petr Vorel 3 participants 8 messages Sep 30, 2022 – Oct 10, 2022

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/1 zram01.sh: Fix minimal size for XFS on kernel 5.19

mkfs.xfs for kernel 5.19 bumps minimum filesystems 300 MB. Due this we already updated minimal filesystem size for all_filesystems / $TST_ALL_FILESYSTEMS in 66e05c841. But zram01.sh does not use the API, thus update it now.

Also require 1G of RAM for XFS (check originally added in f18c8fd3a for Btrfs on ppc64le due to larger page size, likely needed for also XFS).

---
Changes v1->v2:
* add 1GB memory check also for XFS (check_space_for_fs, Cyril)

Kind regards,
Petr

 testcases/kernel/device-drivers/zram/zram01.sh | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
testcases/kernel/device-drivers/zram/zram01.sh +12 -5
index 8b92b699f..d4e46c247 100755
@@ -11,13 +11,14 @@ TST_TESTFUNC="do_test"
 TST_NEEDS_CMDS="awk bc dd"
 TST_SETUP="setup"
 
-check_space_for_btrfs()
+check_space_for_fs()
 {
+	local fs="$1"
 	local ram_size
 
 	ram_size=$(awk '/MemTotal:/ {print $2}' /proc/meminfo)
 	if [ "$ram_size" -lt 1048576 ]; then
-		tst_res TINFO "not enough space for Btrfs"
+		tst_res TINFO "not enough space for $fs"
 		return 1
 	fi
 	return 0
@@ -41,9 +42,15 @@ initialize_vars()
 	for fs in $(tst_supported_fs -s tmpfs); do
 		size="26214400"
 		limit="25M"
-		if [ "$fs" = "btrfs" ]; then
-			check_space_for_btrfs || continue
-			size="402653184"
+
+		if [ "$fs" = "btrfs" -o "$fs" = "xfs" ]; then
+			check_space_for_fs "$fs" || continue
+
+			if [ "$fs" = "btrfs" ]; then
+				size="402653184"
+			elif [ "$fs" = "xfs" ]; then
+				size=314572800
+			fi
 			limit="$((size/1024/1024))M"
 		fi
 
Signature · 5 lines
2.37.3


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by on v2 1/1
#1 lore raw

Hi!
Looks good to me. Please make sure that this gets tested fairly before pushing.

Also Li if you can please double check since we are very late in the release process.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#2 lore raw
Quoted 3 lines

Hi!
Looks good to me. Please make sure that this gets tested fairly before pushing.

+1. I've tested it on Tumbleweed, kernel 6.0.0-rc7-1.g74aafe0-default, mkfs.xfs 5.19.0.

Quoted 2 lines

Also Li if you can please double check since we are very late in the release process.

+1
I can merge it tonight, or wait for Li on next week.

Thanks for your review!

Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw

Hi!

Quoted 9 lines
Quoted 2 lines

Looks good to me. Please make sure that this gets tested fairly before pushing.

+1. I've tested it on Tumbleweed, kernel 6.0.0-rc7-1.g74aafe0-default, mkfs.xfs 5.19.0.

Quoted 2 lines

Also Li if you can please double check since we are very late in the release process.

+1
I can merge it tonight, or wait for Li on next week.

I'm going to tag the git in the evening/afternoon so it would be nice to get this in ASAP.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#4 lore raw
Quoted 6 lines

Hi!

Quoted 4 lines
Quoted 2 lines

Looks good to me. Please make sure that this gets tested fairly before pushing.

+1. I've tested it on Tumbleweed, kernel 6.0.0-rc7-1.g74aafe0-default, mkfs.xfs 5.19.0.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Also Li if you can please double check since we are very late in the release process.

+1
I can merge it tonight, or wait for Li on next week.

I'm going to tag the git in the evening/afternoon so it would be nice to get this in ASAP.

OK, we have another regression in 1f6bd6e66 ("tst_test.sh: Add $TST_ALL_FILESYSTEMS"). I'll reply to release thread.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#5 lore raw
In reply to Cyril Hrubis

Hi all,

Tested on affected 5.19 kernel and various older SLES kernels. Therefore merged.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#6 lore raw

Hi Petr, Cyril,

Thanks for moving on this, and good to see the new released. I had to suspend work and deal with some family matters last week, so sorry for the later reply.

Quoted 9 lines · Petr Vorel

Hi all,

Tested on affected 5.19 kernel and various older SLES kernels. Therefore merged.

Kind regards,
Petr

Signature · 2 lines
Regards,
Li Wang
Signature · 2 lines
-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#7 lore raw

Hi Li,

Quoted 5 lines

Hi Petr, Cyril,

Thanks for moving on this, and good to see the new released. I had to suspend work and deal with some family matters last week, so sorry for the later reply.

No problem, understand, hope everything is OK on your side. And thank you for your work, you're one of the most active reviewers.

Kind regards,
Petr

Quoted 9 lines · Petr Vorel
Quoted 8 lines

Hi all,

Tested on affected 5.19 kernel and various older SLES kernels. Therefore merged.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp