Re: [RFC][PATCH 3/8 v2] ext4: initialize extent status tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 19, 2012 at 03:05:41PM -0400, Theodore Ts'o wrote:
> On Wed, Aug 22, 2012 at 02:05:40PM +0800, Zheng Liu wrote:
> > diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> > index 3e0851e..353b1fd 100644
> > --- a/fs/ext4/super.c
> > +++ b/fs/ext4/super.c
> > @@ -944,6 +944,7 @@ 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);
> >  	ei->i_reserved_data_blocks = 0;
> >  	ei->i_reserved_meta_blocks = 0;
> >  	ei->i_allocated_meta_blocks = 0;
> 
> This patch hunk immediately me ask, "so when does the extent_status
> tree get freed?"  And I believe the answer is that currently, since it
> only tracks delayed extents (and we're not using it for locking
> purposes), by the time we have evicted the inode and are ready to call
> ext4_clear_inode(), we should have released all of the nodes in the
> ext4_es_tree.   Is that correct?
> 
> If so, we might want to think about adding a sanity check to make sure
> that by the time we are done with the inode in ext4_evict_inode()
> (after we have forced writeback), the ext4_es_tree is empty.  Agreed?

Hi Ted,

Today I revise this patch again, and I find extent_status_tree is freed
in ext4_clear_inode().  So maybe I don't think that we need to check
this tree to be freed in ext4_evict_inode().  This change is in this
patch '[RFC][PATCH 4/8 v2] ext4: let ext4 maintain extent status tree'.
What's your opinion?

Regards,
Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux