Re: racing libdevmapper calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On mer, 2005-10-19 at 00:30 +0200, Christophe Varoqui wrote:
> Hello,
> 
> The following command :
> # dmsetup remove foo;echo "0 10 linear 8:16 63"|dmsetup create foo &
> echo "0 20 linear 8:16 63"|dmsetup create foo
> 
> will quite easily produce error message like :
> "device-mapper ioctl cmd 3 failed: Device or resource busy"
> 
> Is it designed behaviour ?
> Can't we expect libdevmapper to serialize its ioctls ?
> 
> multipath(8), being run in storms by udev, has trouble with this.
> Ideas ?
> 
I realize this example is trivially flawed : 2nd ioctl will necessarily
fail, and the message is appropriate in this case.

But in multipath(8), I tried something like :

if (map exists) /* through DM_DEVICE_INFO */
	DM_DEVICE_RELOAD
else
	DM_DEVICE_CREATE

Which translate like :
# dmsetup remove foo;echo "0 10 linear 8:16 63"|dmsetup create foo &
dmsetup info foo || echo "0 20 linear 8:16 63"|dmsetup create foo

But I can't seem to avoid the "device-mapper ioctl cmd 3 failed: Device
or resource busy" messages.

Regards,
cvaroqui


--

dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux