Hi, Rich
-----Original Message-----
From: Richard W.M. Jones [mailto:rjones@redhat.com]
Sent: Monday, April 27, 2015 10:01 PM
To: Chen, Hanxiao/陈 晗霄
Cc: libguestfs(a)redhat.com
Subject: Re: [Libguestfs] [PATCH 00/10] virt-resize: add support for resizing MBR
logical partitions
On Thu, Apr 23, 2015 at 02:14:12AM -0400, Chen Hanxiao wrote:
> In current virt-resize, only primary partitions(including
> extended partition) are supported. They are collected in an
> array for resize operations. Logical partitions are not
> supported.
>
> This series add support for resizing logical partitions.
>
> Original patches by Hu Tao at:
>
https://www.redhat.com/archives/libguestfs/2014-October/msg00238.html
>
> Chen Hanxiao (10):
> resize: don't filter out logical partitions
> resize: don't count new size of logical and extended partition
> resize: caculate the size of logical partitions
> resize: update calculate_target_partitions for logical partitions
> resize: calculate location of the partitions of logical partition
> resize: skip overlap check for logical partitions
> resize: parted logical partitions
> resize: caculate surplus for resize extended partition
> resize: support resize extended partition
> resize: test: add support for resizing extended and logical partitions
>
> resize/resize.ml | 144 ++++++++++++++++++++++++++++++++++-----------
> resize/test-virt-resize.pl | 32 ++--------
> 2 files changed, 114 insertions(+), 62 deletions(-)
No, this patch series cannot be applied.
It doesn't model what extended / logical partitions look like.
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.
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.
Regards,
- Chen