Re:Linux: Ext4 data corruption in 6.1.64-1
by tremon on Sunday December 10, 2023 @04:45PM
(#38595355)
I think they meant non-catastrophic (no pun intended). From what I can tell, individual files can get corrupted when opened with O_DIRECT, but the filesystem structure will never fail.
> file position is not updated after direct IO write and thus [we] direct IO writes are ending in wrong locations effectively corrupting data.
This may be a major problem for hypervisors using ext4-backed disk images. It wouldn't surprise me if qemu opens image files with O_DIRECT by default, but it would surprise me if professional shops were using ext4 as the backing store rather than a provisioning abstraction layer like dm_thin. Still, anyone using kvm on top of ext4 must not be having a good day.
From the link in https://news.ycombinator.com/item?id=38591444 :
> file position is not updated after direct IO write and thus [we] direct IO writes are ending in wrong locations effectively corrupting data.
This may be a major problem for hypervisors using ext4-backed disk images. It wouldn't surprise me if qemu opens image files with O_DIRECT by default, but it would surprise me if professional shops were using ext4 as the backing store rather than a provisioning abstraction layer like dm_thin. Still, anyone using kvm on top of ext4 must not be having a good day.