Ext3 ‘data=guarded’ mode coming for Linux kernel 2.6.30?

In the light of recent “Ext3 fsync” problem related discussions happened in the Linux Kernel mailing list involving many experts in the field, there has been quite a few improvements. There were some patches from Theodore T’so – the Ext4 maintainer, Jens Axboe – the block layer maintainer, Chris Mason – the Btrfs developer et al. An overview of the discussion can be found at LWN.net, here.

Ext3 filesystem by default mounts the disk in a “data=ordered” mode. It basically means, the actual data will be written on the disk before the metadata is written on the disk. But this causes long delays while using the “fsync()” system call. An improvement suggested usually is to change the mount option to “data=writeback“. Whenever I install a Fedora system, one of the first things I used to speedup the file operations is to change the Ext3 mount option to “writeback“. But it has its own share of problems too. After a crash, it is very likely to have corrupted data than in “ordered” mode. Risking the data integrity for performance, I myself ran into issues – sometimes system used to lock up when I use a composite manager like Compiz or Kwin, and I will have to use Alt-SysRq to reboot. After the crash, while logging back, some of the GNOME settings would be lost or slightly corrupted.

Well, Chris Mason has proposed another mode, which can be enabled by a new mount option called “data=guarded” which takes care of most of the issues with performance and data integrity. The version 3 of the patchset has been posted yesterday. And it looks very probable that Linus will pull it for inclusion into kernel 2.6.30, which is in the rc2 state now.

Update: The first 2 patches in the patch series (of 3 patches), which are adding infrastructure for the “data=guarded” mode has been merged by Linus. The 3rd patch which adds the functionality has been tested by Mike Galbraith and found issue of data corruption, for which the root cause was quickly found by Chris Mason and fixed.

Advertisements

One thought on “Ext3 ‘data=guarded’ mode coming for Linux kernel 2.6.30?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s