[parted-devel] [PATCH 1/6] libparted: refactor device-mapper partition sync code
Jim Meyering
jim at meyering.net
Thu Oct 18 18:01:59 UTC 2012
Jim Meyering wrote:
> Jim Meyering wrote:
>> 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 | 403 +++++++++++++++++++++---------------------------
>>> tests/Makefile.am | 1 +
>>> tests/t6002-dm-busy.sh | 94 +++++++++++
>>> 4 files changed, 275 insertions(+), 225 deletions(-)
>>> create mode 100644 tests/t6002-dm-busy.sh
>>>
>>> diff --git a/NEWS b/NEWS
>>> index 4c4716d..f182cce 100644
>>> --- a/NEWS
>>> +++ b/NEWS
>>> @@ -3,6 +3,8 @@ GNU parted NEWS -*- outline -*-
>>> * Noteworthy changes in release ?.? (????-??-??) [?]
>>>
>>> ** Bug Fixes
>>> + libparted: Don't fail to manipulate partitions on dmraid disks that
>>> + have other partitions in use.
>>
>> Hi Phillip,
>>
>> Rats.
>> I've finally run your new test, and it fails on Fedora 17.
>> It fails because the .../dev/mapper/plinear-1675p? devices never appear.
>> i.e.
>>
>> I ran this:
>>
>> sudo make check -C tests TESTS=t6002-dm-busy.sh VERBOSE=yes
>>
>> and found this in the log:
> ...
>> + fail_ /dev/mapper/plinear-9049p2 did not appear
>> + warn_ 't6002-dm-busy.sh: failed test: /dev/mapper/plinear-9049p2'
>> did not appear
>> + case $IFS in
>> + printf '%s\n' 't6002-dm-busy.sh: failed test:
>> /dev/mapper/plinear-9049p2 did not appear'
>> t6002-dm-busy.sh: failed test: /dev/mapper/plinear-9049p2 did not appear
>
> The following patch makes the test pass for me now, on Fedora 17.
> Can you apply the full, amended c-set below and confirm that it passes for
> you, too?
If you can do that and ACK my changes, I'll happily push that change.
Thanks.
...
> Subject: [PATCH] libparted: refactor device-mapper partition sync code
>
> 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.
> ---
...
More information about the parted-devel
mailing list