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

Phillip Susi psusi at ubuntu.com
Thu Oct 18 03:17:22 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/17/2012 01:26 PM, Jim Meyering wrote:
>   +device-mapper: create ioctl on plinear-9049p1 failed: Device or resource busy
>   +Error: Failed to add partition 1 (No such device or address)
> FYI, I'm using this kernel: 3.5.2-3.fc17.x86_64
> 
> That's both with and without the changes I've made.
> Any idea what's wrong?

That's the error I was talking about.  The strange thing is that it doesn't happen when I run the same commands by hand.  I can only assume that the failure happens when parted tries to recreate the partition after having removed it.  I have no idea why the kernel would ever return EBUSY in the create ioctl, so I suppose I'll have to look at the code.

It also did not happen for me until after I squashed my original patch with a latter commit with the canonical name fix, though I don't see how that could have caused it.

Now that I look at it again, I'm also wondering why libdevmapper claimed EBUSY, but parted saw ENXIO as the error.  It is almost like the previous remove ioctl completed before actually removing the partition, leaving a race condition where sometimes it still exists when parted tries to re-add it.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQf3TCAAoJEJrBOlT6nu7564MIAJRXwpDCkJHWK7IWAA0316Gs
4zovGc+LH988F+ZyrnOF4U2Tg4gqMV60+FZVj36Y6K1iTWSwRLk4pDyvMxtisteH
WhuuTj+fFeJGTq2KDBO8YbOaAxj8GCEKhVc91LqmJYlRJJANjIAmoESaHtpvYRi/
a1m79+2ex+n+p8K0jLB8uSxQGQ6G4Dl7CSDYbDrVYY3w4o9oVXeb9B+RiL2N6E8a
18l9Oase3FVqFlPBVGE3eSlpDvDLt/5daOtyXOSJynpMX5p6MeXgtLY8fAT35vTM
etB9x8VB90vIJ7ldle2wwmDy0y0LoW0+sUJ+LsfDPkcvlNrZRF+SCrR2I0Zvhns=
=tnnk
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list