|
|
Subscribe / Log in / New account

Ext4 data corruption in stable kernels

Ext4 data corruption in stable kernels

Posted Dec 10, 2023 11:58 UTC (Sun) by gspr (subscriber, #91542)
In reply to: Ext4 data corruption in stable kernels by pabs
Parent article: Ext4 data corruption in stable kernels

To narrow down which backups to load: am I correct in understanding that this shouldn't affect files that haven't been written to since before a broken kernel was run?


to post comments

Ext4 data corruption in stable kernels

Posted Dec 13, 2023 10:50 UTC (Wed) by jan.kara (subscriber, #59161) [Link]

Correct. Only written files could have been corrupted. Furthermore the corruption can happen only if the application uses direct IO (open with O_DIRECT flag) to write to the file which is not that common. Finally, the data corruption happened because file position was not properly updated after the write. So cases where file position is always set to the desired value before starting the write (such as using AIO which always requires offset, using pwrite(2) call, or calling lseek(2)) were not affected. So up to now I'm not aware of any application that would actually end up corrupting its data due to this bug. But the potential is certainly there...


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds