v3->v4:
-fix that sbi->s_dirtyclusters_counter is used before
initialization.
v2->v3:
-fix warning that sb->s_umount is still held when unit test finishs
-fix warning that sbi->s_freeclusters_counter is used before
initialization.
v1->v2:
-properly handle error from sget()
Previously, the new mballoc unit tests are only tested by running
"./tools/testing/kunit/kunit.py run ..." in which case only rare configs
are enabled.
This series fixes issues when more debug configs are enabled. Fixes are
tested with and without kunit_tool [1].
[1] https://docs.kernel.org/dev-tools/kunit/run_manual.html
Kemeng Shi (3):
ext4: alloc test super block from sget
ext4: hold group lock in ext4 kunit test
ext4: initialize sbi->s_freeclusters_counter and
sbi->s_dirtyclusters_counter before use in kunit test
fs/ext4/mballoc-test.c | 85 +++++++++++++++++++++++++++++++++---------
1 file changed, 68 insertions(+), 17 deletions(-)
--
2.30.0
On Tue, Mar 05, 2024 at 12:35:40AM +0800, Kemeng Shi wrote:
> v3->v4:
> -fix that sbi->s_dirtyclusters_counter is used before
> initialization.
>
I see no more ext4 related crashes, unit test failures, or tracebacks
with this version of the series applied on top of next-20240304.
I'll send Tested-by: tags as response to the individual patches.
Thanks,
Guenter
on 3/5/2024 2:55 AM, Guenter Roeck wrote:
> On Tue, Mar 05, 2024 at 12:35:40AM +0800, Kemeng Shi wrote:
>> v3->v4:
>> -fix that sbi->s_dirtyclusters_counter is used before
>> initialization.
>>
>
> I see no more ext4 related crashes, unit test failures, or tracebacks
> with this version of the series applied on top of next-20240304.
>
> I'll send Tested-by: tags as response to the individual patches.
I'm so glad that the unit test works better. Thanks a lot for testing and
letting me konw.
Kemeng
>
> Thanks,
> Guenter
>
On 3/4/24 23:14, Kemeng Shi wrote:
>
>
> on 3/5/2024 2:55 AM, Guenter Roeck wrote:
>> On Tue, Mar 05, 2024 at 12:35:40AM +0800, Kemeng Shi wrote:
>>> v3->v4:
>>> -fix that sbi->s_dirtyclusters_counter is used before
>>> initialization.
>>>
>>
>> I see no more ext4 related crashes, unit test failures, or tracebacks
>> with this version of the series applied on top of next-20240304.
>>
>> I'll send Tested-by: tags as response to the individual patches.
> I'm so glad that the unit test works better. Thanks a lot for testing and
> letting me konw.
My pleasure. Thanks a lot for taking care of the problems!
Guenter
On Tue, 05 Mar 2024 00:35:40 +0800, Kemeng Shi wrote:
> v3->v4:
> -fix that sbi->s_dirtyclusters_counter is used before
> initialization.
>
> v2->v3:
> -fix warning that sb->s_umount is still held when unit test finishs
> -fix warning that sbi->s_freeclusters_counter is used before
> initialization.
>
> [...]
Applied, thanks!
[1/3] ext4: alloc test super block from sget
commit: 8ffc0cd24c2a3ea340743db18b1a1e999176fbd3
[2/3] ext4: hold group lock in ext4 kunit test
commit: ad943758e0ebd881d031b657a3f389315bf3a101
[3/3] ext4: initialize sbi->s_freeclusters_counter and sbi->s_dirtyclusters_counter before use in kunit test
commit: 0ecae5410ab526225293d2591ca4632b22c2fd8c
Best regards,
--
Theodore Ts'o <[email protected]>