News for hackers. Stuff that matters.
Re:Ext4 data corruption in 6.1 stable by RainbowFriends on Saturday December 09, 2023 @03:43PM (#38585867)
I guess this falls into the class of Linux bugs that causes regressions on the LTS kernel, where you'd be safer running stable.
Re:Ext4 data corruption in 6.1 stable by jeroen79 on Saturday December 09, 2023 @03:04PM (#38585412)
so everything before 6.1 is ok, and after 6.5 is also ok?
Re:Ext4 data corruption in 6.1 stable by altairprime on Saturday December 09, 2023 @03:40PM (#38585835)
6.1.64+ affected, per reply on thread.
Re:Ext4 data corruption in 6.1 stable by kvemkon on Sunday December 10, 2023 @09:31AM (#38591724)
Should be fixed in 6.1.66.

iomap: update ki_pos a little later in iomap_dio_complete

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...

Re:Ext4 data corruption in 6.1 stable by csdvrx on Sunday December 10, 2023 @02:42PM (#38594284)
Is what you've linked the patch that should be backported to affected kernels?

As the potentially problematic patch causing the corruption, I found https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux... but it's not present in the 6.2.2 I run.

I'm very conservative in the versions or critical components like kernels or dkms modules, that didn't protect me against the ZFS bug, but it seems to have avoided me this EXT4 bug!

Re:Ext4 data corruption in 6.1 stable by pixl97 on Saturday December 09, 2023 @05:32PM (#38586788)
>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!
Re:Ext4 data corruption in 6.1 stable by spyc on Sunday December 10, 2023 @09:43AM (#38591815)
The way I read https://lore.kernel.org/stable/20231205122122.dfhhoaswsfscuh... 6.5+ should be okay. PS: Please correct me if not!
Re:Ext4 data corruption in 6.1 stable by Modified3019 on Saturday December 09, 2023 @05:15PM (#38586641)
Is this triggered under certain workloads, or has it been chewing data for everyone, and how much?
Re:Ext4 data corruption in 6.1 stable by o11c on Saturday December 09, 2023 @06:49PM (#38587461)
It appears to require O_DIRECT, which is notoriously buggy and no sane program should ever use.
Re:Ext4 data corruption in 6.1 stable by spyc on Sunday December 10, 2023 @09:31AM (#38591727)
Could you share your source on how/when/if O_DIRECT is required? Have a link?
Re:Ext4 data corruption in 6.1 stable by fulafel on Monday December 11, 2023 @03:41AM (#38598746)
It's in this HN submission's link. It could be that O_SYNC is also needed.
Re:Ext4 data corruption in 6.1 stable by csdvrx on Saturday December 09, 2023 @05:58PM (#38587030)
> Is this triggered under certain workloads, or has it been chewing data for everyone, and how much?

Unless you are checksumming your files through a daemon run on a schedule (IDS style) AND manually review the results every now and then, you can't know.

Re:Ext4 data corruption in 6.1 stable by uselpa on Sunday December 10, 2023 @02:54AM (#38589928)
If you have versioned backups, you can diff against update_day-1 without an additional tool.
Re:Ext4 data corruption in 6.1 stable by csdvrx on Sunday December 10, 2023 @02:35PM (#38594208)
I have versioned backups for a few months. Most people don't and can't (it requires a lot of storage)

Even if they have them, the diffing needs to be done.

Given the past problems with ZFS, I think I'll write a summarizer, that creates a database of metadata for each backup: it will be small to keep around, and may be use more easily to determine which backup contains the uncorrupted file.

Re:Ext4 data corruption in 6.1 stable by uselpa on Sunday December 10, 2023 @02:48PM (#38594351)
I use borgbackup so the storage requirements are fairly low if the data does not change too much (which is my case). Also diffs are just a « borg diff » away.
Re:Ext4 data corruption in 6.1 stable by snvzz on Saturday December 09, 2023 @05:15PM (#38586649)
When the Linux kernel is huge (MLoCs!), complex and lacks stable internal APIs, this should not surprise anyone.

There are better ways to do it, and it is being done.

Refer to the microkernel multiserver architecture, with efforts such as Genode (on seL4) or Fuchsia.

Re:Ext4 data corruption in 6.1 stable by diegocg on Sunday December 10, 2023 @08:23AM (#38591368)
How on earth does running a file system in userspace suddenly makes file systems safe?

Also, how does putting N millions of LoC in N projects solve problems magically?

Re:Ext4 data corruption in 6.1 stable by uselpa on Saturday December 09, 2023 @06:48PM (#38587449)
I had already updated to the problematic kernel, so I resorted to installing 6.5 from backports. Hope this helps.
Re:Ext4 data corruption in 6.1 stable by jacobgorm on Saturday December 09, 2023 @06:51PM (#38587472)
I’ve defaulted to XFS since it became available for Linux, and never had any problems. Only once, some time around 2009, did I try ext3 and it forgot to flush a lot of data that were lost. I don’t see why anyone would use ext over XFS.
Re:Ext4 data corruption in 6.1 stable by davidgerard on Saturday December 09, 2023 @07:11PM (#38587588)
XFS is all but unmaintained, which may be a good reason to be cautious. Very stable code, but the world may change out from under it.
Re:Ext4 data corruption in 6.1 stable by snvzz on Saturday December 09, 2023 @07:15PM (#38587610)
In a sane system, the world would not "change out from under it".

Linux is a special category of mess.

Re:Ext4 data corruption in 6.1 stable by crote on Saturday December 09, 2023 @10:01PM (#38588626)
Why would the world not change?

When XFS was designed, the storage ecosystem was spinning rust attached using PATA and SCSI. We've developed quite a bit since then, with things like SAS, NVMe, and SSDs. Storage have gotten over an order of magnitude more throughput, over an order of magnitude less latency, and several orders of magnitude more IOPS.

Running a filesystem designed for ancient hardware means you won't be taking advantage of several decades of innovation.

Re:Ext4 data corruption in 6.1 stable by snvzz on Sunday December 10, 2023 @12:39AM (#38589412)
The world here means the APIs XFS is built on top of.

Yes, it is possible to maintain stable APIs and even offer multiple versions of. Other systems (even AmigaOS in the 80s) manage to do so.

Linux is a special case.

Re:Ext4 data corruption in 6.1 stable by jacobgorm on Monday December 11, 2023 @05:39AM (#38599342)
In what ways would you say that ext4 takes advantage of the latest several decades of innovation, where XFS does not? Both XFS and ext2 were first released around 1993, and it is safe to say that XFS was more advanced than ext2 at that time, given that it had journaling and ext2 did not.

If I wanted something actually novel, I would go for ZFS or one of its clones.

Re:Ext4 data corruption in 6.1 stable by diegocg on Sunday December 10, 2023 @08:21AM (#38591360)
XFS is adding pretty radical features and reworking its internals in interesting ways, it's Ext4 the one that doesn't really see that many changes these days.
Re:Ext4 data corruption in 6.1 stable by abrookewood on Saturday December 09, 2023 @11:52PM (#38589192)
Any of the people who were freaking out over a rare ZFS corruption care to comment?
Re:Ext4 data corruption in 6.1 stable by ThePowerOfFuet on Sunday December 10, 2023 @01:52AM (#38589683)
What about it?