Comment 8 for bug 585027

Revision history for this message
Alasdair G. Kergon (agk2) wrote : Re: [Bug 585027] Re: Race condition with dmsetup causes 'map already present' messages

On Mon, Jul 09, 2012 at 03:29:11PM -0000, Peter Petrakis wrote:
> In examining the ioctl interface to device mapper (kernel), I have not found any architecture that
> assures that when a device mapper device has been marked for deletion, that this information is
> relayed back to userspace so it can block on this deletion. An example will clarify things.

If this is the same process that issued the deletion that needs to wait
till the device has gone, then the udevcookie mechanism is meant to
provide that already. (Multipathd is supposed to be using that
mechanism, upstream at least.)

If it's a different process, then I consider it's userspace's job to
co-ordinate the sequencing of ioctls that conflict with each other.