lkml.org 
[lkml]   [2006]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Ext2-devel] [PATCH] fix ext3 mounts at 16T
Andreas Dilger wrote:
> On Aug 18, 2006 12:39 -0500, Eric Sandeen wrote:
>> @@ -168,7 +168,7 @@ goal_in_my_reservation(struct ext3_reser
>> ext3_fsblk_t group_first_block, group_last_block;
>>
>> group_first_block = ext3_group_first_block_no(sb, group);
>> - group_last_block = group_first_block + EXT3_BLOCKS_PER_GROUP(sb) - 1;
>> + group_last_block = group_first_block + (EXT3_BLOCKS_PER_GROUP(sb) - 1);
>>
>> if ((rsv->_rsv_start > group_last_block) ||
>> (rsv->_rsv_end < group_first_block))
>> @@ -897,7 +897,7 @@ static int alloc_new_reservation(struct
>> spinlock_t *rsv_lock = &EXT3_SB(sb)->s_rsv_window_lock;
>>
>> group_first_block = ext3_group_first_block_no(sb, group);
>> - group_end_block = group_first_block + EXT3_BLOCKS_PER_GROUP(sb) - 1;
>> + group_end_block = group_first_block + (EXT3_BLOCKS_PER_GROUP(sb) - 1);
>>
>> if (grp_goal < 0)
>> start_block = group_first_block;
>
> I don't see how these can make a difference? Surely, if the intermediate
> sum overflows it will then underflow when "- 1" is done? Not that I mind,
> per-se, just curious why you think this fixes anything.

Well, you're right, if it overflows then it will underflow again. And I've not
observed any actual failures, and I don't expect to. But personally I guess I'd
rather avoid the whole overflow in the first place... maybe I'm being silly. :)

If you think it's unnecessary code churn then we can not make this change...

-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-19 01:59    [W:3.069 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site