mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
16eb729564
commit
91246c0090
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue