diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-08-19 21:14:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-08-19 21:14:52 -0400 |
commit | 91246c009094142f95ecc7573b7caed2bcef52c7 (patch) | |
tree | df84e815f9441f24558cf5d22dcc61d8b222497e /fs/ext4/super.c | |
parent | 16eb72956496594d023a7d7cd14a86404ad195ad (diff) | |
download | linux-3.10-91246c009094142f95ecc7573b7caed2bcef52c7.tar.gz linux-3.10-91246c009094142f95ecc7573b7caed2bcef52c7.tar.bz2 linux-3.10-91246c009094142f95ecc7573b7caed2bcef52c7.zip |
ext4: Initialize writeback_index to 0 when allocating a new inode
The write_cache_pages() function uses the mapping->writeback_index as
the starting index to write out when range_cyclic is set. Properly
initialize writeback_index so that we start the writeout at index 0.
This was found when debugging the small file fragmentation on ext4.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index d5d77958b86..566344b926b 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -568,6 +568,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) #endif ei->i_block_alloc_info = NULL; ei->vfs_inode.i_version = 1; + ei->vfs_inode.i_data.writeback_index = 0; memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache)); INIT_LIST_HEAD(&ei->i_prealloc_list); spin_lock_init(&ei->i_prealloc_lock); |