RE: racing libdevmapper calls

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

 



On Wed, 19 Oct 2005 00:30:45 +0200
Christophe Varoqui <christophe.varoqui@xxxxxxx> wrote:

> 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 ?

Yes, I think so.  Whichever create runs first wins the race.
The second create gets EBUSY since the name "foo" is already
taken.

> Can't we expect libdevmapper to serialize its ioctls ?

No, this is unreasonable.  Any time ordering of these events
should be external to the libdevmapper library.

> 
> multipath(8), being run in storms by udev, has trouble with this.
> Ideas ?

I've been working on patches to multipath-tools which will allow
multipathd(8) to properly react add/remove path/map block type
uevents and not require any multipath-tools interaction with hotplug.

I think these patches have also eliminated the need for multipath(8) to
be used to configure paths -- although it is still needed to display
the results in pretty format -- at least until "multipath -k" is
enhanced to do similarly.

> 
> 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