linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott James Remnant <scott@ubuntu.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: device-mapper development <dm-devel@redhat.com>,
	linux-hotplug-devel@lists.sourceforge.net
Subject: Re: [dm-devel] [PATCH] improve atomicity of device creation
Date: Tue, 11 Dec 2007 17:40:28 +0000	[thread overview]
Message-ID: <1197394828.25082.39.camel@quest> (raw)
In-Reply-To: <3ae72650712110935n20398423t1da02c585a72aead@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1090 bytes --]

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

> On Dec 11, 2007 5:08 PM, Scott James Remnant <scott@ubuntu.com> 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@ubuntu.com

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 278 bytes --]

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  reply	other threads:[~2007-12-11 17:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-11 16:08 [PATCH] improve atomicity of device creation Scott James Remnant
2007-12-11 16:25 ` [dm-devel] " Alasdair G Kergon
2007-12-11 16:42   ` Scott James Remnant
2007-12-11 17:03     ` Alasdair G Kergon
2007-12-11 17:18       ` Scott James Remnant
2007-12-11 17:51         ` Kay Sievers
2007-12-11 18:08           ` Alasdair G Kergon
2007-12-11 18:25             ` Kay Sievers
2007-12-11 19:13               ` Alasdair G Kergon
2007-12-11 19:43               ` Alasdair G Kergon
2007-12-11 17:35 ` Kay Sievers
2007-12-11 17:40   ` Scott James Remnant [this message]
2007-12-11 17:53     ` Alasdair G Kergon
2007-12-11 19:09       ` Scott James Remnant
2007-12-11 18:03     ` Kay Sievers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1197394828.25082.39.camel@quest \
    --to=scott@ubuntu.com \
    --cc=dm-devel@redhat.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-hotplug-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).