diff mbox series

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

Message ID 20240731111804.1161524-1-nilay@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series [blktests] loop/011: skip if running on kernel older than v6.10 | expand

Commit Message

Nilay Shroff July 31, 2024, 11:17 a.m. UTC
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.

Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
---
 tests/loop/011 | 1 +
 1 file changed, 1 insertion(+)

Comments

Cyril Hrubis July 31, 2024, 11:23 a.m. UTC | #1
Hi!
> 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.

> Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
> ---
>  tests/loop/011 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/loop/011 b/tests/loop/011
> index 35eb39b..b674dd7 100755
> --- a/tests/loop/011
> +++ b/tests/loop/011
> @@ -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
>  }
>  
> -- 
> 2.45.2
>
Shinichiro Kawasaki July 31, 2024, 12:01 p.m. UTC | #2
On Jul 31, 2024 / 13:23, Cyril Hrubis wrote:
> Hi!
> > 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?
Nilay Shroff July 31, 2024, 12:41 p.m. UTC | #3
On 7/31/24 17:31, Shinichiro Kawasaki wrote:
> On Jul 31, 2024 / 13:23, Cyril Hrubis wrote:
>> Hi!
>>> 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?
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
Cyril Hrubis July 31, 2024, 12:46 p.m. UTC | #4
Hi!
> > 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.

> 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: stable@vger.kernel.org

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 <stable@vger.kernel.org> know about it.



commit 6718aa792b7d297ece53024a138ea679e8153ea6
Author: Cyril Hrubis <chrubis@suse.cz>
Date:   Thu Jun 13 18:38:17 2024 +0200

    loop: Disable fallocate() zero and discard if not supported
Nilay Shroff July 31, 2024, 1:59 p.m. UTC | #5
Hi Shinichiro,

On 7/31/24 18:16, Cyril Hrubis wrote:
> Hi!
>>> 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 ?

diff --git a/tests/loop/011 b/tests/loop/011
index 35eb39b..a454848 100755
--- a/tests/loop/011
+++ b/tests/loop/011
@@ -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
Shinichiro Kawasaki Aug. 1, 2024, 6:27 a.m. UTC | #6
On Jul 31, 2024 / 19:29, Nilay Shroff wrote:
> Hi Shinichiro,
> 
> On 7/31/24 18:16, Cyril Hrubis wrote:
> > Hi!
> >>> 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?

I have the same guess.

> And if this is true then how about rewriting the patch as below ?
> 
> diff --git a/tests/loop/011 b/tests/loop/011
> index 35eb39b..a454848 100755
> --- a/tests/loop/011
> +++ b/tests/loop/011
> @@ -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?
Nilay Shroff Aug. 1, 2024, 9:12 a.m. UTC | #7
On 8/1/24 11:57, Shinichiro Kawasaki wrote:
> On Jul 31, 2024 / 19:29, Nilay Shroff wrote:
>> Hi Shinichiro,
>>
>> On 7/31/24 18:16, Cyril Hrubis wrote:
>>> Hi!
>>>>> 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?
> 
> I have the same guess.
> 
>> And if this is true then how about rewriting the patch as below ?
>>
>> diff --git a/tests/loop/011 b/tests/loop/011
>> index 35eb39b..a454848 100755
>> --- a/tests/loop/011
>> +++ b/tests/loop/011
>> @@ -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?
Sure, I will send another patch.

Thanks,
--Nilay
diff mbox series

Patch

diff --git a/tests/loop/011 b/tests/loop/011
index 35eb39b..b674dd7 100755
--- a/tests/loop/011
+++ b/tests/loop/011
@@ -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
 }