[Ocfs2-devel] [PATCH 1/2] Ocfs2: Optimize truncting codes for ocfs2 to use ocfs2_remove_btree_range instead.

tristan tristan.ye at oracle.com
Mon Feb 8 17:12:07 PST 2010


Joel Becker wrote:
> On Fri, Feb 05, 2010 at 06:45:31PM +0800, Tristan Ye wrote:
>   
>> I merge the following steps into one patch since they may be logically doing one thing,
>> Though I knew it looks a little bit fat to review.
>>
>> 1). Remove redundant codes used by ocfs2_commit_truncate before, since we're moving to
>>     ocfs2_remove_btree_range anyway.
>>
>> 2). Add a new func ocfs2_reserve_blocks_for_rec_trunc() for purpose of accepting  some
>>     extra blocks to reserve.
>>
>> 3). Change ocfs2_prepare_refcount_change_for_del() a bit to fit our needs, it's safe to
>>     do this since it's only being called by truncating codes.
>>
>> 4). Change ocfs2_remove_btree_range() a bit to take refcount case into account.
>>
>> 5). Finally, we change ocfs2_commit_truncate() to call ocfs2_remove_btree_range() in
>>     a proper way.
>>     
>
> 	I was going to be mad that these 5 things weren't five patches,
> but actually it reads pretty well as a patch.  I'm OK with it being one
> patch.
>   

Joel,

Yes, it actually was doing one thing logically, the reason why I listed 
the steps is try to make things straightforward.

To separate the patch into five smaller ones was really a bad idea, 
which turns the code into a inconsistent state after applying each.

Thanks,
Tristan.

> 	Mark, can I get an Ack?
>
> Joel
>
>   




More information about the Ocfs2-devel mailing list