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

Jim Meyering jim at meyering.net
Wed Oct 17 18:53:35 UTC 2012


Brian C. Lane wrote:
> On Wed, Oct 17, 2012 at 07:26:41PM +0200, Jim Meyering wrote:
>> 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 into this yesterday, it appears that losetup doesn't like the
> 'private' /dev/ nodes that we create for loop, when you try to run it
> again it compares to /dev/loopX instead of the path given at creation.
>
> I don't see a good reason to have duplicate nodes so I rewrote
> loop_setup. See the attached patch.
>
> --
> Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
>
> From a1aa9eb26f357bb1a5111eb332594dfb7b39ace0 Mon Sep 17 00:00:00 2001
> From: "Brian C. Lane" <bcl at redhat.com>
> Date: Mon, 15 Oct 2012 17:27:18 -0700
> Subject: [PATCH 1/2] tests: cleanup losetup usage
>
> The unsafe_losetup_ function was failing because losetup didn't
> recognize that the 'private' /dev/loopX devices were the same as
> /dev/loopX, it would fail even if one was in use. Switch to using
> losetup --show which is a cleaner solution.
> Also use sparse file for loop_setup to save space.

Thanks!  That looks like it'll be great.
However it doesn't apply to master now, since lvm-utils.sh is removed.
Would you remind rebasing it?



More information about the parted-devel mailing list