On Wed, Apr 29, 2015 at 09:19:24AM +0000, Chen, Hanxiao wrote:
commit 6e989fd709fea37430398cbb7c01c52cd44bd1ac already did this:
we had p_mbr_p_type : partition_type in type partition.
Like what MBR/EBR did, this patchset use `partition_type`:
/dev/sda3:
partition data: 3 210763776-420478975 (209715200 bytes)
bootable: false
partition ID: 0x5
content: extended partition
label: (none)
GUID: (none)
*partition type: extended*
/dev/sda5:
partition data: 5 211812352-222298111 (10485760 bytes)
bootable: false
partition ID: 0x83
content: unknown data
label: (none)
GUID: (none)
*partition type: logical*
As we could only had one extended partition,
all logical partitions belong to that extended partition,
so current type partition of virt-resize can reflect logical/extended partition model.
The specific problem is that the extended partition (eg /dev/sda3)
contains the logical partition (/dev/sda5). Having a flat list
doesn't express that at all.
I agree it is very hard to express this, because extended partitions
just work so differently from how any sensible partition scheme should
work (because they are a big hack). But perhaps:
- flat list of primary partitions (as now, the global 'partitions')
- one MBR extended partition (as a new global variable)
- flat list of logical partitions
would do it? It still has the problem that the extended partition is
a bit like a primary partition, yet isn't in the partitions list.
> It's very hard to understand what changes are being made.
The commits
> are not grouped in a way that makes them easily understandable to me.
I'll try to regroup them and make the patchset easy to review.
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v