]> bbs.cooldavid.org Git - net-next-2.6.git/commit
ext4: Clean up s_dirt handling
authorTheodore Ts'o <tytso@mit.edu>
Sat, 12 Jun 2010 03:14:04 +0000 (23:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 12 Jun 2010 03:14:04 +0000 (23:14 -0400)
commita0375156ca1041574b5d47cc7e32f10b891151b0
treeb791961012b9348f289c3dda5dc071bdf9b736d2
parent7e27d6e778cd87b6f2415515d7127eba53fe5d02
ext4: Clean up s_dirt handling

We don't need to set s_dirt in most of the ext4 code when journaling
is enabled.  In ext3/4 some of the summary statistics for # of free
inodes, blocks, and directories are calculated from the per-block
group statistics when the file system is mounted or unmounted.  As a
result the superblock doesn't have to be updated, either via the
journal or by setting s_dirt.  There are a few exceptions, most
notably when resizing the file system, where the superblock needs to
be modified --- and in that case it should be done as a journalled
operation if possible, and s_dirt set only in no-journal mode.

This patch will optimize out some unneeded disk writes when using ext4
with a journal.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/balloc.c
fs/ext4/ext4.h
fs/ext4/ext4_jbd2.c
fs/ext4/ext4_jbd2.h
fs/ext4/file.c
fs/ext4/ialloc.c
fs/ext4/mballoc.c
fs/ext4/resize.c
fs/ext4/xattr.c