There is potential for data loss on ext4 in the case of an unclean shutdown. The following links describe the issue in detail: http://lwn.net/Articles/323169/ http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem/ https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781?comments=all Patches to fix the most common occurances are here: http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=commitdiff;h=dbc85aa9f11d8c13c15527d43a3def8d7beffdc8 http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=commitdiff;h=6645f8c3bc3cdaa7de4aaa3d34d40c2e8e5f09ae http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=commitdiff;h=3bf3342f394d72ed2ec7e77b5b39e1b50fad8284 This patches inhibit the behavior of delayed allocation under certain circumstances. They are queued only for kernel 2.6.30, not the -stable trees. I suspect this is due to the policy that patches must be in Linus' kernel tree before they will be considered for -stable and thus they will likely eventually be in a future 2.6.28 and/or 2.6.29 -stable release. But for now they are not being considered. The patches have already been accepted into the next Ubuntu Jaunty kernel: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=summary I will be adding the patches in sys-kernel/hardened-sources-2.6.28-r3 (either via genpatches or hardened-extras patchset, depending on release timing). Also of interest is: http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=commitdiff;h=17db0c1ec3d2fdd1ada0f042098f9b1dc6193982 This patch adds a mount option to revert the behavior change of the three patches above. Perhaps of interest to non-desktop-oriented machines that are less likely to run offending software. I doubt I will include this patch in hardened-extras, but if added to genpatches I wouldn't UNIPATCH_EXCLUDE it either.
Unrelated, but while looking through Theodore Tso's ext4 queue I stumbled upon this patch, which I will likely also include while I'm at it: http://git.kernel.org/?p=linux/kernel/git/tytso/ext4.git;a=commitdiff;h=3cb5e61547e9ee5f040d7a02c48c7cdf6485eecc
These were folded into hardened-patches-2.6.28-4 which is based upon 2.6.28.7: 1910_ext4-automatically-allocate-delay-allocated-blocks-on-rename.patch 1911_ext4-automatically-allocate-delay-allocated-blocks-on-close.patch 1912_ext4-add-EXT4_IOC_ALLOC_DA_BLKS-ioctl.patch 1913_ext4-fix-discard-of-inode-prealloc-space-with-delayed-allocation.patch I'm really posting to point out that the above mentioned patches are still applicable with respect to the latest 2.6.28.8 release.
Thanks for your work, guys. This will be in gentoo-sources-2.6.28-r4.
Released in gentoo-sources-2.6.28-r4