bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrong logical sector size detection


From: Benjamin Cama
Subject: Re: Wrong logical sector size detection
Date: Thu, 06 Apr 2006 18:07:30 +0200

Le jeudi 06 avril 2006 à 15:56 +0200, address@hidden a écrit :
> Hello Benjamin,
> 
>   thank you very much for your _excellent_ bug report!

Thanks ;-)

> 
> The rationale for changing sector_size to "long long" can be found
> somewhere on this mailing list around the time the change was committed
> and lies in automtical conversion.
> 
>   Suppose you have an expression like this:
> 
>   sector_size * MAX_INT
> 
>   With "int sector_size" it will overflow, but with "long long
> sector_size" the result will get promoted to "long long".

OK. I looked at the discussion about it, and now i think this is
justified, as i didn't know that so much operations were done on these
numbers (just grep'ing for sector_size give quite a long result).


>   The bugs with the ioctl and the printf are of course genuine. The fix
> for them will go into rc4, which I will probably release today.

Great.

> 
>   I wonder why this bug did not appear earlier. Why would your setup
> expose this bug? Do the PowerPC chips happen to be big-endian by any
> chance?

Yes, the PPC architecture is big-endian, but i don't think this problem
is related to this : this is a size problem. This should appear on every
32 bits archs, including Intel ! I don't know the hardware you're
working on, but i suspect a 64 bits (with a 64 bits kernel, as i think
this problem may happen on a 64b arch with a 32b kernel).

The reason for this bug not appearing earlier may be that this version
has been quite untested... Even debian unstable is still shipped with
1.6.25, which doesn't include the change to long long. And when your
latest package isn't included in any major distro, i don't think that
many people test it ...?

[after being quite sceptical and having tested it on an Intel P4 with a
2.6.8 kernel (on a debian testing)] : In fact it works well on a 32b
Intel ..?!? I think i should investigate this further, i don't see why
the PPC version is screwed up.

> 
>   Best wishes,
> 
>     Leslie

Friendly,
Benjamin Cama






reply via email to

[Prev in Thread] Current Thread [Next in Thread]