From patchwork Fri Oct 26 13:23:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3/8,v3] ext4: initialize extent status tree Date: Fri, 26 Oct 2012 03:23:40 -0000 From: Zheng Liu X-Patchwork-Id: 194471 Message-Id: <1351257825-3701-4-git-send-email-wenqing.lz@taobao.com> To: linux-ext4@vger.kernel.org, jeff.liu@oracle.com Cc: tytso@mit.edu, hughd@google.com, xiaoqiangnk@gmail.com, achender@linux.vnet.ibm.com, lczerner@redhat.com, Zheng Liu From: Zheng Liu Let ext4 initialize extent status tree of an inode. CC: "Theodore Ts'o" Signed-off-by: Yongqiang Yang Signed-off-by: Allison Henderson Signed-off-by: Zheng Liu --- v3 <- v2: - initialize i_es_lock fs/ext4/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 80928f7..e0c824b 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -943,6 +943,8 @@ static struct inode *ext4_alloc_inode(struct super_block *sb) 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); + ext4_es_init_tree(&ei->i_es_tree); + rwlock_init(&ei->i_es_lock); ei->i_reserved_data_blocks = 0; ei->i_reserved_meta_blocks = 0; ei->i_allocated_meta_blocks = 0;