From: Mike Snitzer <snitzer@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 1/3] Send KOBJ_ADD event after dm resume ioctl.
Date: Fri, 19 Mar 2010 11:55:42 -0400 [thread overview]
Message-ID: <20100319155541.GA24051@redhat.com> (raw)
In-Reply-To: <7b13a0f81003190658i78664328ocb94aa0048054a17@mail.gmail.com>
Hi David,
On Fri, Mar 19 2010 at 9:58am -0400,
David Zeuthen <zeuthen@gmail.com> wrote:
> Hey Kay,
>
> On Fri, Mar 19, 2010 at 9:43 AM, Kay Sievers <kay.sievers@vrfy.org> wrote:
>
> > On Fri, Mar 19, 2010 at 14:24, Peter Rajnoha <prajnoha@redhat.com> wrote:
> > > On 03/19/2010 10:24 AM, Kay Sievers wrote:
> > >> No, that's what "change" is for, and we already have these "change"
> > >> events for dm. Udev does not care if the device is ready or not, it
> > >> synchronizes /sys and /dev, and that works just fine with "change"
> > >> events.
> > >
> > > CHANGE events, not quite... We can't even rely on these.
> > >
> > > Just to mention, there's also a CHANGE event generated when
> > > read-only flag is set for a device (this is not managed by
> > > device-mapper of course). This one is generated even before
> > > the actual CHANGE event that is generated when DM device is
> > > ready to be used.
> >
> > Sure, but as mentioned earlier, these events are just expected to
> > fail, and update the current udev state, if they can't retrieve the
> > needed information or find out that the device in not usable.
> >
>
> I think the problem is the that fact that 3rd party user space
> opens the device before it is ready (e.g. just after ADD but before
> the first CHANGE) makes things fall over.
>
> This short-coming is what needs to get fixed, I think - it's very
> fragile this way and since any random user / package can add
> rules to open the device on add events, said user / package can
> make device-mapper fail. Which doesn't exactly strike me
> as robust behavior.
When I first read this response I thought we had a major break-through,
namely: udev allowing udev rules to race with the tool that is making
the device usable was not "robust behavior".
But your 2nd mail in this thread established that I had wishful thinking
on that so-called break-through.
At least we agree that these uevents are causing DM to race against
arbitrary udev rules; which leads to sporadic failures.
I think I understand udev's utopian intent to have all udev rules be
able to do as they wish with any device: said access should "fail
gracefully" on devices that aren't ready.
Thing is, this isn't scalable at all. Having all these arbitrary rules
issuing IOs to devices that aren't usable is a complete waste of time.
On enterprise systems that have 100s (*shudder* 1000s) of LUNs, this
udev rules' freedom to access such unusable devices is really working
against us (if the goal is to activate devices as quickly and reliably
as possible).
We at least need a way to _reliably_ allow DM to do its work of managing
its devices. What if udev were to offer a per device "udev rules lock"
(exposed via sysfs?) that allows subsystems (e.g. DM) to know they can't
yet proceed with exclussively accessing the device they are tasked with
managing?
This per device "udev rules lock" would at least allow DM to cope with
the racey nature of udev rules. Not ideal as it still allows
inefficient (and unecessary) access to devices that shouldn't be touched
but it would at least be a means to an end (or so I'd think).
Mike
next prev parent reply other threads:[~2010-03-19 15:55 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 13:58 [PATCH 1/3] Send KOBJ_ADD event after dm resume ioctl Milan Broz
2010-03-18 13:58 ` [PATCH 2/3] Add genhd flag requesting notification of partition changes only Milan Broz
2010-03-18 13:58 ` [PATCH 3/3] Do not send multiple REMOVE events for kobjects Milan Broz
2010-03-18 16:13 ` [PATCH 1/3] Send KOBJ_ADD event after dm resume ioctl Kay Sievers
2010-03-18 17:24 ` Alasdair G Kergon
2010-03-18 21:35 ` Milan Broz
2010-03-19 8:27 ` Kay Sievers
2010-03-19 9:06 ` Lars Ellenberg
2010-03-19 9:24 ` Kay Sievers
2010-03-19 9:49 ` Milan Broz
2010-03-19 10:16 ` Kay Sievers
2010-03-19 11:14 ` Milan Broz
2010-03-19 11:44 ` Kay Sievers
2010-03-19 12:08 ` Milan Broz
2010-03-19 12:14 ` Kay Sievers
2010-03-19 11:50 ` Hannes Reinecke
2010-03-19 12:00 ` Alasdair G Kergon
2010-03-19 12:12 ` Alasdair G Kergon
2010-03-19 12:16 ` Kay Sievers
2010-03-19 13:17 ` Peter Rajnoha
2010-03-19 13:24 ` Peter Rajnoha
2010-03-19 13:43 ` Kay Sievers
2010-03-19 13:47 ` Alasdair G Kergon
2010-03-19 13:58 ` David Zeuthen
2010-03-19 14:34 ` Alasdair G Kergon
2010-03-19 14:59 ` David Zeuthen
2010-03-19 15:24 ` Alasdair G Kergon
2010-03-19 16:01 ` David Zeuthen
2010-03-19 16:36 ` Alasdair G Kergon
2010-03-22 10:11 ` Milan Broz
2010-03-19 15:55 ` Mike Snitzer [this message]
2010-03-19 16:08 ` David Zeuthen
2010-03-19 14:08 ` Hannes Reinecke
2010-03-19 15:05 ` Peter Rajnoha
2010-03-19 15:14 ` David Zeuthen
2010-03-19 15:51 ` Peter Rajnoha
2010-03-19 9:10 ` Milan Broz
2010-03-19 9:22 ` Kay Sievers
2010-03-19 9:42 ` Hannes Reinecke
2010-03-19 12:27 ` Alasdair G Kergon
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=20100319155541.GA24051@redhat.com \
--to=snitzer@redhat.com \
--cc=dm-devel@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.