Skip to contentSkip to conversation

5.15.140-rc1 review

PATCH In review Greg Kroah-Hartman 6 participants 309 messages Nov 24, 2023 – Dec 11, 2023 Page 3 of 3

Subsystems (3)
lore
Share & tools
lore
#300 lore raw
In reply to Greg Kroah-Hartman

Hello!

Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 5.15.140 release. There are 297 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Sun, 26 Nov 2023 17:19:17 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.140-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.

thanks,

greg k-h

We are noticing a regression with ltp-syscalls' preadv03:

-----8<-----
preadv03 preadv03
preadv03_64 preadv03_64
preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512
----->8-----

This is seen in the following environments:
* dragonboard-845c
* juno-64k_page_size
* qemu-arm64
* qemu-armv7
* qemu-i386
* qemu-x86_64
* x86_64-clang

and on the following RC's:
* v5.10.202-rc1
* v5.15.140-rc1
* v6.1.64-rc1

(Note that the list might not be complete, because some branches failed to execute completely due to build issues reported elsewhere.)

Bisection in linux-5.15.y pointed to:

commit db85c7fff122c14bc5755e47b51fbfafae660235
Author: Jan Kara <[email protected]>
Date: Fri Oct 13 14:13:50 2023 +0200

ext4: properly sync file size update after O_SYNC direct IO

commit 91562895f8030cb9a0470b1db49de79346a69f91 upstream.

Reverting that commit made the test pass.

Greetings!

Daniel Díaz
[email protected]

author maintainer
#301 lore raw
Quoted 74 lines · Daniel Díaz

Hello!

Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 5.15.140 release. There are 297 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Sun, 26 Nov 2023 17:19:17 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.140-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.

thanks,

greg k-h

We are noticing a regression with ltp-syscalls' preadv03:

-----8<-----
preadv03 preadv03
preadv03_64 preadv03_64
preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512
----->8-----

This is seen in the following environments:
* dragonboard-845c
* juno-64k_page_size
* qemu-arm64
* qemu-armv7
* qemu-i386
* qemu-x86_64
* x86_64-clang

and on the following RC's:
* v5.10.202-rc1
* v5.15.140-rc1
* v6.1.64-rc1

(Note that the list might not be complete, because some branches failed to execute completely due to build issues reported elsewhere.)

Bisection in linux-5.15.y pointed to:

commit db85c7fff122c14bc5755e47b51fbfafae660235
Author: Jan Kara <[email protected]>
Date: Fri Oct 13 14:13:50 2023 +0200

Quoted 5 lines

ext4: properly sync file size update after O_SYNC direct IO commit 91562895f8030cb9a0470b1db49de79346a69f91 upstream.

Reverting that commit made the test pass.

Odd. I'll go drop that from 5.10.y and 5.15.y now, thanks.

greg k-h

#302 lore raw
In reply to Daniel Díaz

Hello!

Quoted 15 lines · Daniel Díaz
Quoted 14 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 5.15.140 release. There are 297 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Sun, 26 Nov 2023 17:19:17 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.140-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.

Quoted 5 lines
Quoted 3 lines

thanks,

greg k-h

We are noticing a regression with ltp-syscalls' preadv03:

Thanks for report!

Quoted 38 lines

-----8<-----
preadv03 preadv03
preadv03_64 preadv03_64
preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512
----->8-----

This is seen in the following environments:
* dragonboard-845c
* juno-64k_page_size
* qemu-arm64
* qemu-armv7
* qemu-i386
* qemu-x86_64
* x86_64-clang

Quoted 4 lines

and on the following RC's:
* v5.10.202-rc1
* v5.15.140-rc1
* v6.1.64-rc1

Hum, even in 6.1? That's odd. Can you please test whether current upstream vanilla kernel works for you with this test? Thanks!

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#303 lore raw

Hello!

Quoted 64 lines · Jan Kara

Hello!

Quoted 15 lines · Daniel Díaz
Quoted 14 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 5.15.140 release. There are 297 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Sun, 26 Nov 2023 17:19:17 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

    https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.140-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.

Quoted 5 lines
Quoted 3 lines

thanks,

greg k-h

We are noticing a regression with ltp-syscalls' preadv03:

Thanks for report!

Quoted 38 lines

-----8<-----
preadv03 preadv03
preadv03_64 preadv03_64
preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512
----->8-----

This is seen in the following environments:
* dragonboard-845c
* juno-64k_page_size
* qemu-arm64
* qemu-armv7
* qemu-i386
* qemu-x86_64
* x86_64-clang

Quoted 7 lines
Quoted 4 lines

and on the following RC's:
* v5.10.202-rc1
* v5.15.140-rc1
* v6.1.64-rc1

Hum, even in 6.1? That's odd. Can you please test whether current upstream vanilla kernel works for you with this test? Thanks!

Yes, this is working for us on mainline and next:
https://qa-reports.linaro.org/lkft/linux-mainline-master/tests/ltp-syscalls/preadv03
https://qa-reports.linaro.org/lkft/linux-next-master/tests/ltp-syscalls/preadv03
c.fr. 6.1:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/tests/ltp-syscalls/preadv03

Greetings!

Daniel Díaz
[email protected]

#304 lore raw

ext4 data corruption in 6.1 stable tree (was Re: [PATCH 5.15 000/297] 5.15.140-rc1 review)

Hello!

Quoted 71 lines · Daniel Díaz
Quoted 62 lines · Jan Kara
Quoted 15 lines · Daniel Díaz
Quoted 14 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 5.15.140 release. There are 297 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Sun, 26 Nov 2023 17:19:17 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

    https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.15.140-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
and the diffstat can be found below.

Quoted 5 lines
Quoted 3 lines

thanks,

greg k-h

We are noticing a regression with ltp-syscalls' preadv03:

Thanks for report!

Quoted 38 lines

-----8<-----
preadv03 preadv03
preadv03_64 preadv03_64
preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'a' expectedly preadv03.c:87: TPASS: preadv(O_DIRECT) read 512 bytes successfully with content 'b' expectedly preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512 preadv03.c:102: TINFO: Using block size 512
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:77: TFAIL: Buffer wrong at 0 have 62 expected 61
preadv03.c:66: TFAIL: preadv(O_DIRECT) read 0 bytes, expected 512
----->8-----

This is seen in the following environments:
* dragonboard-845c
* juno-64k_page_size
* qemu-arm64
* qemu-armv7
* qemu-i386
* qemu-x86_64
* x86_64-clang

Quoted 7 lines
Quoted 4 lines

and on the following RC's:
* v5.10.202-rc1
* v5.15.140-rc1
* v6.1.64-rc1

Hum, even in 6.1? That's odd. Can you please test whether current upstream vanilla kernel works for you with this test? Thanks!

Quoted 7 lines

Yes, this is working for us on mainline and next:
https://qa-reports.linaro.org/lkft/linux-mainline-master/tests/ltp-syscalls/preadv03
https://qa-reports.linaro.org/lkft/linux-next-master/tests/ltp-syscalls/preadv03
c.fr. 6.1:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y/tests/ltp-syscalls/preadv03

Greetings!

So I've got back to this and the failure is a subtle interaction between iomap code and ext4 code. In particular that fact that commit 936e114a245b6 ("iomap: update ki_pos a little later in iomap_dio_complete") is not in stable causes that file position is not updated after direct IO write and thus we direct IO writes are ending in wrong locations effectively corrupting data. The subtle detail is that before this commit if ->end_io handler returns non-zero value (which the new ext4 ->end_io handler does), file pos doesn't get updated, after this commit it doesn't get updated only if the return value is < 0.

The commit got merged in 6.5-rc1 so all stable kernels that have 91562895f803 ("ext4: properly sync file size update after O_SYNC direct IO") before 6.5 are corrupting data - I've noticed at least 6.1 is still carrying the problematic commit. Greg, please take out the commit from all stable kernels before 6.5 as soon as possible, we'll figure out proper backport once user data are not being corrupted anymore. Thanks!

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer
#305 lore raw

Re: ext4 data corruption in 6.1 stable tree (was Re: [PATCH 5.15 000/297] 5.15.140-rc1 review)

On Tue, Dec 05, 2023 at 01:21:22PM +0100, Jan Kara wrote:
[ ... ]

Quoted 11 lines

So I've got back to this and the failure is a subtle interaction between iomap code and ext4 code. In particular that fact that commit 936e114a245b6 ("iomap: update ki_pos a little later in iomap_dio_complete") is not in stable causes that file position is not updated after direct IO write and thus we direct IO writes are ending in wrong locations effectively corrupting data. The subtle detail is that before this commit if ->end_io handler returns non-zero value (which the new ext4 ->end_io handler does), file pos doesn't get updated, after this commit it doesn't get updated only if the return value is < 0.

Quoted 7 lines

The commit got merged in 6.5-rc1 so all stable kernels that have 91562895f803 ("ext4: properly sync file size update after O_SYNC direct IO") before 6.5 are corrupting data - I've noticed at least 6.1 is still carrying the problematic commit. Greg, please take out the commit from all stable kernels before 6.5 as soon as possible, we'll figure out proper backport once user data are not being corrupted anymore. Thanks!

Thanks a lot for the update.

Turns out this is causing a regression in chromeos-6.1, and reverting the offending patch fixes the problem. I suspect anyone running v6.1.64+ may have a problem.

Guenter

author maintainer
#306 lore raw

Re: ext4 data corruption in 6.1 stable tree (was Re: [PATCH 5.15 000/297] 5.15.140-rc1 review)

Quoted 21 lines · Guenter Roeck

On Tue, Dec 05, 2023 at 01:21:22PM +0100, Jan Kara wrote:
[ ... ]

Quoted 11 lines

So I've got back to this and the failure is a subtle interaction between iomap code and ext4 code. In particular that fact that commit 936e114a245b6 ("iomap: update ki_pos a little later in iomap_dio_complete") is not in stable causes that file position is not updated after direct IO write and thus we direct IO writes are ending in wrong locations effectively corrupting data. The subtle detail is that before this commit if ->end_io handler returns non-zero value (which the new ext4 ->end_io handler does), file pos doesn't get updated, after this commit it doesn't get updated only if the return value is < 0.

Quoted 7 lines

The commit got merged in 6.5-rc1 so all stable kernels that have 91562895f803 ("ext4: properly sync file size update after O_SYNC direct IO") before 6.5 are corrupting data - I've noticed at least 6.1 is still carrying the problematic commit. Greg, please take out the commit from all stable kernels before 6.5 as soon as possible, we'll figure out proper backport once user data are not being corrupted anymore. Thanks!

Quoted 5 lines

Thanks a lot for the update.

Turns out this is causing a regression in chromeos-6.1, and reverting the offending patch fixes the problem. I suspect anyone running v6.1.64+ may have a problem.

Jan, thanks for the report, and Guenter, thanks for letting me know as well. I'll go queue up the fix now and push out new -rc releases.

greg k-h

#307 lore raw

Re: ext4 data corruption in 6.1 stable tree (was Re: [PATCH 5.15 000/297] 5.15.140-rc1 review)

Hi!

Quoted 18 lines
Quoted 18 lines
Quoted 17 lines

So I've got back to this and the failure is a subtle interaction between iomap code and ext4 code. In particular that fact that commit 936e114a245b6 ("iomap: update ki_pos a little later in iomap_dio_complete") is not in stable causes that file position is not updated after direct IO write and thus we direct IO writes are ending in wrong locations effectively corrupting data. The subtle detail is that before this commit if ->end_io handler returns non-zero value (which the new ext4 ->end_io handler does), file pos doesn't get updated, after this commit it doesn't get updated only if the return value is < 0.

The commit got merged in 6.5-rc1 so all stable kernels that have 91562895f803 ("ext4: properly sync file size update after O_SYNC direct IO") before 6.5 are corrupting data - I've noticed at least 6.1 is still carrying the problematic commit. Greg, please take out the commit from all stable kernels before 6.5 as soon as possible, we'll figure out proper backport once user data are not being corrupted anymore. Thanks!

Quoted 8 lines
Quoted 5 lines

Thanks a lot for the update.

Turns out this is causing a regression in chromeos-6.1, and reverting the offending patch fixes the problem. I suspect anyone running v6.1.64+ may have a problem.

Jan, thanks for the report, and Guenter, thanks for letting me know as well. I'll go queue up the fix now and push out new -rc releases.

Would someone have a brief summary here? I see 6.1.66 is out but I don't see any "Fixes: 91562895f803" tags.

Plus, what is the severity of this? It is "data being corrupted when using O_SYNC|O_DIRECT" or does metadata somehow get corrupted, too?

Thanks and best regards,
Pavel

Signature · 2 lines
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#308 lore raw

Re: ext4 data corruption in 6.1 stable tree (was Re: [PATCH 5.15 000/297] 5.15.140-rc1 review)

Quoted 24 lines · Pavel Machek
Quoted 24 lines
Quoted 23 lines
Quoted 10 lines

So I've got back to this and the failure is a subtle interaction between iomap code and ext4 code. In particular that fact that commit 936e114a245b6 ("iomap: update ki_pos a little later in iomap_dio_complete") is not in stable causes that file position is not updated after direct IO write and thus we direct IO writes are ending in wrong locations effectively corrupting data. The subtle detail is that before this commit if ->end_io handler returns non-zero value (which the new ext4 ->end_io handler does), file pos doesn't get updated, after this commit it doesn't get updated only if the return value is < 0.

Quoted 7 lines

The commit got merged in 6.5-rc1 so all stable kernels that have 91562895f803 ("ext4: properly sync file size update after O_SYNC direct IO") before 6.5 are corrupting data - I've noticed at least 6.1 is still carrying the problematic commit. Greg, please take out the commit from all stable kernels before 6.5 as soon as possible, we'll figure out proper backport once user data are not being corrupted anymore. Thanks!

Thanks a lot for the update.

Turns out this is causing a regression in chromeos-6.1, and reverting the offending patch fixes the problem. I suspect anyone running v6.1.64+ may have a problem.

Quoted 8 lines
Quoted 2 lines

Jan, thanks for the report, and Guenter, thanks for letting me know as well. I'll go queue up the fix now and push out new -rc releases.

Would someone have a brief summary here? I see 6.1.66 is out but I don't see any "Fixes: 91562895f803" tags.

Plus, what is the severity of this? It is "data being corrupted when using O_SYNC|O_DIRECT" or does metadata somehow get corrupted, too?

It is pure data corruption happening for ext4 direct IO writes because they do not properly update current file position after the write.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR