Skip to main content
 

Since you missed this before...

Since you missed this before...

Originally shared by Theodore Ts'o

Phoronix, alas, has perpetrated another example of irresponsible journalism.   I won't dignify said article with a web link, since I don't want to reward them with more ad hits.  So I'll link to the original Ubuntu Launchpad report, and include the comment I just made there:

Those specific fsck corrections --- fixing the number of free blocks and the number of free inodes --- is completely normal and is purely a cosmetic issue. There is nothing to worry about here.

What is going on is that ext4 no longer updates the superblock after every block and inode allocation; that causes a wasteful write cycle to the superblock at every single journal commit, and it also is a SMP scalability bottleneck for larger servers (i.e., with 32 or 64 CPU's). To fix this, we no longer update these values in the superblock every time we allocate a block or an inode. Instead, we only update these values when we unmount the file system, mainly for cosmetic purposes so that dumpe2fs shoes the correct number of free inodes and blocks, and at mount time we calculate the total number of free blocks and inodes in the file system by summing the the free blocks/inodes statistics for each block group. So in fact, ext4 does not depend on the correctness of the values in the superblock, but it does try to update them on a clean unmount.

In e2fsprogs commit id 2788cc879bbe6, which is in e2fsprogs 1.42. 3 and newer, we changed things so that e2fsck -n would not display this as something "wrong". However, we still do show this as something that we "fix" when running e2fsck -y or -p, since in fact it is a change to the file systems. See: http://git.kernel.org/?p=fs/ext2/e2fsprogs.git;a=commit;h=2788cc879bbe667d28277e1d660b7e56514e5b30

No one else has complained or noticed up until now, because other distro's apparently are capable of doing a clean shutdown allowing the file system to be unmounted cleanly. Ubuntu, unfortunately, is incapable of reliably doing a clean shutdown even when users request it, which is why Ubuntu users are seeing this behavior much more frequently, and apparently some people have panicked as a result. Sigh....

----

I will say that it is extremely irresponsible of Phoronix to make a big deal about this this before giving anyone knowledgeable (which unfortunately  does not include any Ubuntu kernel engineers, since as far as I know they don't have any file system specialists on staff) to comment on the bug.  No one from Phoronix even bothered to contact me to tell me they were posting this story, or to ask me for a comment.  I had to find out about it when someone asked me to comment on Google+.

However, from the perspective of trying to send as many ad clicks as possible to their web site, they are doing a heckuva job....