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

Bug#474698: partman-base: Inconsistent output if sector size != 512 bytes

Frans Pop <elendil@planet.nl> writes:

> On Tuesday 08 April 2008, Ferenc Wagner wrote:
>> I can imagine that the following patch would fix this issue:
> Looks logical.

And it indeed fixes the parted_devices output (thanks for compiling
it!), but unfortunately not the partman dialog.  Because that gets the
info straight from parted_server in partman-md/init.d/md-devices:

        open_dialog PARTITIONS
        while { read_line num id size type fs path name; [ "$id" ]; }; do
                if [ "$fs" = free ]; then

In the present case parted_server returns:
num=(-1) id=(0-4161535) size=(4161536) type=(primary) fs=(free) path=(/dev/md0) name=()
that is, it erroneously reports half the real size.

I could go on to replace PED_SECTOR_SIZE_DEFAULT with dev->sector_size
throughout partman-base/parted_server.c, but I'm getting suspicious.
Isn't there a good reason for this state of affairs?

>> Unfortunately I don't yet have the Sid system necessary for building
>> the D-I, so can't test it, but would be grateful if somebody could
>> send me an updated parted_devices binary (if the above compiles at
>> all :).  I will try to catch up...
> Next time please specify which architecture. We have 12 you know :-)
> Attached for i386 and amd64.

Of course you guessed right.  Non-i386 people probably never forget
specifying their architecture...

Reply to: