[ENBD] nbd 2.4.27: partition >4GB problem
Tad Kollar
enbd@lists.community.tummy.com
Tue, 12 Mar 2002 12:55:42 -0500
I put in the (size >> 9) fix and it worked like a charm... thanks for the
quick turnaround time!!
Tad
Peter T. Breuer wrote:
> "A month of sundays ago Peter T. Breuer wrote:"
>
> Now I look at it (nbd-client.c) ...
>
>
>>"A month of sundays ago Tad Kollar wrote:"
>> unsigned sectors = size >> 9;
>>
>> // PTB HACK HACK HACK .. why not allow more sectors :-)
>> if (size > (u64)(unsigned)(-1)) {
>>
>
> that "size" should be "(size >> 9)".
>
>
>> sectors = (unsigned)(-1);
>> }
>>
>
>>Anyway, remove the 4 lines beginning HACK HACK HACK, and tell me how it
>>goes.
>>
>>I wonder what that breaks?
>>
>
> I get it now. I was trying to write "if sectors is notionally going
> to be more than or equal to 2^32, then set it to 2^32-1 and be happy".
>
> You can remove the calculation, or fix it. Both are correct approaches!
>
> Peter
> _______________________________________________
> ENBD mailing list
> ENBD@lists.community.tummy.com
> http://lists.community.tummy.com/mailman/listinfo/enbd
>
>
>