From: Neil Brown <neilb@suse.de>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: linux-raid@vger.kernel.org, Doug Ledford <dledford@redhat.com>,
"martin f. krafft" <madduck@debian.org>,
Michal Marek <mmarek@novell.com>
Subject: Re: RFC - device names and mdadm with some reference to udev.
Date: Tue, 28 Oct 2008 11:43:46 +1100 [thread overview]
Message-ID: <18694.24642.729914.620038@notabene.brown> (raw)
In-Reply-To: message from Kay Sievers on Tuesday October 28
On Tuesday October 28, kay.sievers@vrfy.org wrote:
> > But in different places.
> > Debian has /etc/udev/rules
> > openSUSE has /lib/udev/rules
> >
> > I love standards. There are so many to choose from. :-)
>
> They are all valid and needed. You should install in
> /lib/udev/rules.d/ if the rule is not supposed to be edited by the
> user.
Clearer now. Thanks.
> > I notice that 'md'
> > devices don't seem to disappear. Maybe that is because /sys/block/mdX
> > never disappears (last time I tried it was too racy).
>
> It stays because the md kernel device lifetime rules are kind of
> broken regarding hotplug setups. Similar issue why md needs all the
> static nodes in /dev too to create a device.
>
> > Would there be any way to get udev to delete devices when
> > /sys/block/mdX/md/array_state
> > becomes 'clear' (presumably on a CHANGE event) ??
>
> What would be the reason to leave the kernel block device around?
> Can't you just remove it like any other subsytem in the kernel does.
> That would just remove the node, all links and update userspace to
> reflect the change.
I tried some time ago. It was hard.
md devices magic appear when you tried to open the device-special
file. I need some sort of locking to prevent that creation while I'm
destroying the old device. But when I was trying this (quite some
months ago) the locking around do_open was fairly difficult to
follow. I don't remember the exact issues, but I gave up.
What would happen was that when the md device disappear, udev would
try to open it (I think) and make it reappear again. Sometimes with
an oops. I think I avoided some of that by sending the DELETE event
well before the device was actually deleted ... or something. But it
was still far from perfect.
Maybe I should try again.
>
> There is currently no "change" event that could tell to remove a
> device node in /dev while we still have a kernel device around. And
> you would need to convince me that this is really needed, and why md
> is so special here. :)
md is a bit 'special', but not quite unique. I think 'loop' now works
the same way as md in terms of devices magically appearing on open.
Maybe I can see how it was made to work for that case.
Thanks Kay,
NeilBrown
next prev parent reply other threads:[~2008-10-28 0:43 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-26 22:56 RFC - device names and mdadm with some reference to udev Neil Brown
2008-10-27 8:22 ` martin f krafft
2008-10-27 15:13 ` Doug Ledford
2008-10-27 16:10 ` Andre Noll
2008-10-27 16:37 ` Kay Sievers
2008-10-27 16:59 ` martin f krafft
2008-10-27 18:31 ` Kay Sievers
2008-10-28 6:21 ` Luca Berra
2008-10-27 17:24 ` Doug Ledford
2008-10-27 23:36 ` Neil Brown
2008-10-29 18:49 ` Doug Ledford
2008-10-28 6:32 ` Luca Berra
2008-10-28 9:42 ` occasional bitmap was " David Greaves
2008-10-27 17:30 ` Andre Noll
2008-10-27 16:13 ` Kay Sievers
2008-10-27 22:37 ` Neil Brown
2008-10-27 22:51 ` Kay Sievers
2008-10-27 23:56 ` Neil Brown
2008-10-28 0:20 ` Kay Sievers
2008-10-28 6:17 ` Luca Berra
2008-10-27 12:41 ` Kay Sievers
2008-10-27 13:23 ` David Lethe
2008-10-27 23:27 ` Neil Brown
2008-10-27 23:48 ` David Lethe
2008-10-27 13:24 ` Andre Noll
2008-10-27 14:20 ` Kay Sievers
2008-10-27 23:23 ` Neil Brown
2008-10-28 0:03 ` Kay Sievers
2008-10-28 0:43 ` Neil Brown [this message]
2008-10-28 1:16 ` Kay Sievers
2008-10-28 1:44 ` Neil Brown
2008-10-28 1:52 ` Kay Sievers
2008-10-28 1:54 ` Kay Sievers
2008-10-31 20:54 ` Debian and udev (was: RFC - device names and mdadm with some reference to udev.) martin f krafft
2008-10-31 23:08 ` Bernd Schubert
2008-10-29 8:56 ` RFC - device names and mdadm with some reference to udev Gabor Gombas
2008-10-31 20:49 ` mdp devices on Debian (was: RFC - device names and mdadm with some reference to udev.) martin f krafft
2008-10-30 17:18 ` RFC - device names and mdadm with some reference to udev Doug Ledford
2008-10-31 9:45 ` Neil Brown
2008-11-03 9:29 ` Gabor Gombas
2008-11-03 10:33 ` Kay Sievers
2008-11-03 11:58 ` Gabor Gombas
2008-11-03 12:11 ` Kay Sievers
2008-11-03 14:34 ` Doug Ledford
2008-11-03 15:20 ` Dan Williams
2008-11-07 6:13 ` Neil Brown
2008-11-02 13:47 ` Luca Berra
[not found] <dledford@redhat.com>
2008-10-31 1:02 ` greg
2008-10-31 9:18 ` Neil Brown
2008-11-02 13:52 ` Luca Berra
-- strict thread matches above, loose matches on Subject: below --
2008-11-04 15:36 greg
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=18694.24642.729914.620038@notabene.brown \
--to=neilb@suse.de \
--cc=dledford@redhat.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-raid@vger.kernel.org \
--cc=madduck@debian.org \
--cc=mmarek@novell.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 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).