[parted-devel] [PATCH 1/4] libparted: refactor device-mapper partition sync code

Jim Meyering jim at meyering.net
Wed Jan 11 18:56:17 UTC 2012


Phillip Susi wrote:
> The device-mapper partition sync code was still using the remove all
> partitions, then add new partitions method.  Refactor to use the same
> algorithm as regular disks: try to remove all, and ignore any that could
> not be removed but have not changed.
> ---
>  NEWS                   |    2 +
>  libparted/arch/linux.c |  166 ++++++++++++++++++++----------------------------
>  2 files changed, 72 insertions(+), 96 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 58a5f89..4fede6c 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -7,6 +7,8 @@ GNU parted NEWS                                    -*- outline -*-
>    parted has improved support for partitionable loopback devices
>
>  ** Bug fixes
> +  libparted: Don't fail to manipulate partitions on dmraid disks that
> +  have other partitions in use.

This sounds like a good change, too.
Can you write a test case that fails without,
and succeeds with this patch.



More information about the parted-devel mailing list