Re: [PATCH] improve atomicity of device creation

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

 



On Tue, 2007-12-11 at 18:35 +0100, Kay Sievers wrote:

> On Dec 11, 2007 5:08 PM, Scott James Remnant <scott@xxxxxxxxxx> wrote:
> > This is a patch we've written and applied in Ubuntu to improve the
> > atomicity of devmapper device creation somewhat, and avoid races with
> > udev.
> 
> Without synchronization between libdevmapper and udev, you can't
> predict which one will win in creating the node, right?
> So this patch makes is more likely to create a valid device node, but
> it can still happen, that libdevmapper replaces the udev nodes, which
> is not what we want, right?
> 
No, the patch is slightly skewed so that udev always wins.  udev will
always adopt an existing device node, adjusting permissions as
necessary.  The patch makes devmapper "back off" if the device node
exists.

So you end up with either:

 1) devmapper creates device node
 2) udev adopts device node and sets permissions

or:

 1) udev creates device node and sets permissions
 2) devmapper no-ops since it already exists

Scott
-- 
Scott James Remnant
scott@xxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part

--
dm-devel mailing list
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