[Ocfs2-devel] [PATCH v2] ocfs2: make ocfs2_adjust_resv_from_alloc simple.

Tao Ma tao.ma at oracle.com
Sun Apr 25 23:45:36 PDT 2010



Joel Becker wrote:
> On Thu, Apr 08, 2010 at 04:33:02PM +0800, Tao Ma wrote:
>> When we allocate some bits from the reservation, we always
>> allocate from the r_start(see ocfs2_resmap_resv_bits).
>> So there should be no sense for checking between r_start
>> and start. And I don't think we will change this behaviour
>> somehow later by allocating from some bits after r_start.
>> Why not make ocfs2_adjust_resv_from_alloc simple now?
>>
>> So the only chance we have to adjust the reservation is that
>> we haven't reached the end. With this patch, the function is
>> more readable.
>>
>> Note:
>> btw, this patch also fixes an original bug in the function
>> which I haven't found before.
>> 	if (end < ocfs2_resv_end(resv))
>> 		rhs = end - ocfs2_resv_end(resv);
>> This code is of course buggy. ;)
>>
>> Cc: Mark Fasheh <mfasheh at suse.com>
>> Signed-off-by: Tao Ma <tao.ma at oracle.com>
> 
> 	This patch is now in the 'merge-window' branch of ocfs2.git.
thanks, joel.

btw, you still miss another patch which Mark has acked for the merge-window.
http://oss.oracle.com/pipermail/ocfs2-devel/2010-April/006250.html

Regards,
Tao



More information about the Ocfs2-devel mailing list