Skip to contentSkip to conversation

loop/011: skip if running on kernel older than v6.10

PATCH Applied Nilay Shroff 3 participants 8 messages Jul 31, 2024 – Aug 1, 2024 Block layer

v1 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 loop/011: skip if running on kernel older than v6.10

The loop/011 is regression test for kernel commit 5f75e081ab5c ("loop:
Disable fallocate() zero and discard if not supported") which requires minimum kernel version 6.10. So running this test on kernel version older than v6.10 would FAIL. This patch ensures that we skip running loop/011 if kernel version is older than v6.10.

---
 tests/loop/011 | 1 +
 1 file changed, 1 insertion(+)
tests/loop/011 +1 -0
index 35eb39b..b674dd7 100755
@@ -9,6 +9,7 @@
 DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors"
 
 requires() {
+	_have_kver 6 10
 	_have_program mkfs.ext2
 }
 
Signature · 1 line
2.45.2
#1 lore raw

Hi!

Quoted 5 lines

The loop/011 is regression test for kernel commit 5f75e081ab5c ("loop:
Disable fallocate() zero and discard if not supported") which requires minimum kernel version 6.10. So running this test on kernel version older than v6.10 would FAIL. This patch ensures that we skip running loop/011 if kernel version is older than v6.10.

The patch has been backported to 6.9 stable as well.

Quoted 20 lines
---
 tests/loop/011 | 1 +
 1 file changed, 1 insertion(+)
tests/loop/011 +1 -0
index 35eb39b..b674dd7 100755
@@ -9,6 +9,7 @@
 DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors"
 
 requires() {
+	_have_kver 6 10
 	_have_program mkfs.ext2
 }
 
Signature · 1 line
2.45.2
Signature · 2 lines
Cyril Hrubis
[email protected]
#2 lore raw
Quoted 8 lines · Cyril Hrubis

Hi!

Quoted 5 lines

The loop/011 is regression test for kernel commit 5f75e081ab5c ("loop:
Disable fallocate() zero and discard if not supported") which requires minimum kernel version 6.10. So running this test on kernel version older than v6.10 would FAIL. This patch ensures that we skip running loop/011 if kernel version is older than v6.10.

The patch has been backported to 6.9 stable as well.

Hi Cyril, Nilay,

According to www.kernel.org, the 6.9 stable branch is already EOL. Is it planned to backport the kernel fix to other longterm branches?

#3 lore raw
Quoted 8 lines · Shinichiro Kawasaki
Quoted 7 lines · Cyril Hrubis

Hi!

Quoted 5 lines

The loop/011 is regression test for kernel commit 5f75e081ab5c ("loop:
Disable fallocate() zero and discard if not supported") which requires minimum kernel version 6.10. So running this test on kernel version older than v6.10 would FAIL. This patch ensures that we skip running loop/011 if kernel version is older than v6.10.

Quoted 6 lines
Quoted 1 line

The patch has been backported to 6.9 stable as well.

Hi Cyril, Nilay,

According to www.kernel.org, the 6.9 stable branch is already EOL. Is it planned to backport the kernel fix to other longterm branches?

I just checked this commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") hasn't been backported to any of the longterm stable kernel yet. However I don't know if there's any plan to backport it on longterm stable kernel.

Maybe, Cyril should know about it?

If not planned for backport on longterm stable kernel then we may consider the proposed changes in loop/011 as-is.

Thanks,
--Nilay

Applied
#4 lore raw

Hi!

Quoted 5 lines
Quoted 2 lines

According to www.kernel.org, the 6.9 stable branch is already EOL. Is it planned to backport the kernel fix to other longterm branches?

I just checked this commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") hasn't been backported to any of the longterm stable kernel yet. However I don't know if there's any plan to backport it on longterm stable kernel.

The patch will not apply into older branches since the in kernel API did change, so I suppose that nobody will invest into rewriting the patch since it's mostly cosmetic.

Quoted 4 lines

Maybe, Cyril should know about it?

If not planned for backport on longterm stable kernel then we may consider the proposed changes in loop/011 as-is.

That's strange, I got an email shortly after the patch got into mailinine about the backport:

Subject: Patch "loop: Disable fallocate() zero and discard if not supported" has been added to the 6.9-stable tree
Reply-To: [email protected]

This is a note to let you know that I've just added the patch titled

loop: Disable fallocate() zero and discard if not supported

to the 6.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
loop-disable-fallocate-zero-and-discard-if-not-suppo.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit 6718aa792b7d297ece53024a138ea679e8153ea6

Author: Cyril Hrubis <[email protected]>
Date:   Thu Jun 13 18:38:17 2024 +0200

loop: Disable fallocate() zero and discard if not supported

Signature · 2 lines
Cyril Hrubis
[email protected]
#5 lore raw

Hi Shinichiro,

Quoted 11 lines · Cyril Hrubis

Hi!

Quoted 5 lines
Quoted 2 lines

According to www.kernel.org, the 6.9 stable branch is already EOL. Is it planned to backport the kernel fix to other longterm branches?

I just checked this commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") hasn't been backported to any of the longterm stable kernel yet. However I don't know if there's any plan to backport it on longterm stable kernel.

The patch will not apply into older branches since the in kernel API did change, so I suppose that nobody will invest into rewriting the patch since it's mostly cosmetic.

This commit 5f75e081ab5c has been backported to kernel v6.9.11 and per the above comment from Cyril, this commit shall not be backported further to any other longterm kernel.

So is it reasonable to assume that this test would fail on kernel older than v6.9.11? And if this is true then how about rewriting the patch as below ?

tests/loop/011 +1 -0
index 35eb39b..a454848 100755
@@ -9,6 +9,7 @@
 DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors"
 
 requires() {
+       _have_kver 6 9 11
        _have_program mkfs.ext2
 }
 

Thanks,
--Nilay

#6 lore raw
Quoted 15 lines · Nilay Shroff

Hi Shinichiro,

Quoted 11 lines · Cyril Hrubis

Hi!

Quoted 5 lines
Quoted 2 lines

According to www.kernel.org, the 6.9 stable branch is already EOL. Is it planned to backport the kernel fix to other longterm branches?

I just checked this commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") hasn't been backported to any of the longterm stable kernel yet. However I don't know if there's any plan to backport it on longterm stable kernel.

The patch will not apply into older branches since the in kernel API did change, so I suppose that nobody will invest into rewriting the patch since it's mostly cosmetic.

Quoted 5 lines

This commit 5f75e081ab5c has been backported to kernel v6.9.11 and per the above comment from Cyril, this commit shall not be backported further to any other longterm kernel.

So is it reasonable to assume that this test would fail on kernel older than v6.9.11?

I have the same guess.

tests/loop/011 line 14

Quoted 13 lines

And if this is true then how about rewriting the patch as below ?

tests/loop/011 +1 -0
index 35eb39b..a454848 100755
@@ -9,6 +9,7 @@
 DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors"
 
 requires() {
+       _have_kver 6 9 11
        _have_program mkfs.ext2
 }

I think this change is reasonable. Would you repost the patch?

#7 lore raw
Quoted 33 lines · Shinichiro Kawasaki
Quoted 15 lines · Nilay Shroff

Hi Shinichiro,

Quoted 11 lines · Cyril Hrubis

Hi!

Quoted 5 lines
Quoted 2 lines

According to www.kernel.org, the 6.9 stable branch is already EOL. Is it planned to backport the kernel fix to other longterm branches?

I just checked this commit 5f75e081ab5c ("loop: Disable fallocate() zero and discard if not supported") hasn't been backported to any of the longterm stable kernel yet. However I don't know if there's any plan to backport it on longterm stable kernel.

The patch will not apply into older branches since the in kernel API did change, so I suppose that nobody will invest into rewriting the patch since it's mostly cosmetic.

Quoted 5 lines

This commit 5f75e081ab5c has been backported to kernel v6.9.11 and per the above comment from Cyril, this commit shall not be backported further to any other longterm kernel.

So is it reasonable to assume that this test would fail on kernel older than v6.9.11?

I have the same guess.

Quoted 9 lines

And if this is true then how about rewriting the patch as below ?

tests/loop/011 +0 -0
index 35eb39b..a454848 100755
@@ -9,6 +9,7 @@
 DESCRIPTION="Make sure unsupported backing file fallocate does not fill dmesg with errors"
 
Quoted 6 lines

tests/loop/011 line 14

Quoted 4 lines
tests/loop/011 +1 -0
 requires() {
+       _have_kver 6 9 11
        _have_program mkfs.ext2
 }

I think this change is reasonable. Would you repost the patch?

Sure, I will send another patch.

Thanks,
--Nilay