OSDN Git Service

libparted: use ext_range to find out largest possible partition
authorPetr Uzel <petr.uzel@suse.cz>
Sat, 26 Nov 2011 14:45:08 +0000 (15:45 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 26 Nov 2011 21:13:30 +0000 (22:13 +0100)
commitca97da905bd21f2a4371f4717f7c46a936af6b2c
tree442db0adc45be4ddd86d5515d34730d4a2afc590
parente76b1af9dfb33292ba915d30a5042dbfe75d75bd
libparted: use ext_range to find out largest possible partition

Parted uses /sys/block/DEV/range file to find out how many partitions
can the blockdevice hold and uses this number in its algorithm
for informing the kernel about modified partitions. This works
fine for most devices, however, it fails on partitionable MD arrays,
because these have 1 in range file. Using ext_range should be safer
and work for all devices.

* libparted/arch/linux.c (_device_get_partition_range): Use
/sys/block/DEV/ext_range instead of range sysfs file
* NEWS: Mention the change.

Addresses: http://bugzilla.novell.com/567652
NEWS
libparted/arch/linux.c