Bug 13964
Summary: | ext4: panic causes lost data in git | ||
---|---|---|---|
Product: | File System | Reporter: | Jesse Brandeburg (jbrandeb) |
Component: | ext4 | Assignee: | fs_ext4 (fs_ext4) |
Status: | CLOSED WILL_NOT_FIX | ||
Severity: | high | CC: | alan, devzero, sandeen, tytso |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.31-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Jesse Brandeburg
2009-08-11 18:58:35 UTC
related info, I'll try the alloc_on_commit option http://www.h-online.com/open/Ext4-data-loss-explanations-and-workarounds--/news/112892 i also have seen this issue, but i can`t find alloc_on_commit option in latest .git kernel. hasn`t the appropriate patch been merged? The alloc_on_commit patch had a number of deadlock problems, and I've never had time to try to work them out. For now, the recommended solution for git is to put the following in your .gitconfig file: [core] fsyncobjectfiles = yes This will cause git to force an fsync() when writing object files, which is the only portable way of guaranteeing the object files will be written after a crash. This is needed for safety reasons for ext4, xfs, and btrfs filesystems. ok, but what is the solution for all the apps which don`t have issues with ext3 but start having issues with ext4? fix all the apps? that would take a long time... alloc_on_commit really sounds like a good compatibility switch.... I was unable to continue using ext4 for development since it was not reliable through panic. Was there ever any progress on this issue? Due to this bug I have been telling everyone I work with to not use ext4. It is a pretty easy bug to reproduce, isn't there something we can do about it? Jesse, are you still running with data=writeback (as comment nr. 1 seemed to indicate, since you said you would -try- data=ordered...) - data=writeback is just not safe at all for anybody, anywhere, any time, unless you plan to recreate all data post-crash. With default mount options (which includes data=ordered) do you still see this problem on upstream kernels? In the end, though, you have to realize that buffered data which is not synced to disk -will- be lost on a crash. This is true for all filesystems, though the window of "opportunity" may differ.... |