xfs
[Top] [All Lists]

Re: [PATCH] xfs: simplify the calculation of tpp at xfs_bmdr_to_bmbt

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: simplify the calculation of tpp at xfs_bmdr_to_bmbt
From: Hou Tao <houtao1@xxxxxxxxxx>
Date: Fri, 24 Jun 2016 15:01:56 +0800
Cc: <xfs@xxxxxxxxxxx>, <miaoxie@xxxxxxxxxx>, <fangwei1@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160624063805.GD12670@dastard>
References: <1466746760-155962-1-git-send-email-houtao1@xxxxxxxxxx> <20160624063805.GD12670@dastard>
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 2016/6/24 14:38, Dave Chinner wrote:
> On Fri, Jun 24, 2016 at 01:39:20PM +0800, Hou Tao wrote:
>> remove the usage of rblocklen at xfs_bmdr_to_bmbt, and
>> use be16_to_cpu(dblock->bb_numrecs) instead. It also
>> reduces an extra calculation.
> 
> What problem does this fix, why does it need to be made and
> how did you test it?
It fixes nothing, just for simplification of code understanding.
And now I realize keeping the original code untouched is better,
because using rblocklen to calculate the offset of xfs_bmbt_ptr_t
is common among the btree code, so keeping it consistent.

> We have to be really careful about changing code that interacts with
> the on-disk format, as any bugs we introduced will result in
> filesystem corruption.  Hence you need to explain to the reviewers
> why the change needs to be made to the reviewers...
I will take care, Thanks.

> 
> Cheers,
> 
> Dave.
> 

<Prev in Thread] Current Thread [Next in Thread>