linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] Manage: Inform udev about device removal when stopping
@ 2016-02-16 15:47 Hannes Reinecke
  2016-02-16 16:58 ` Sebastian Parschauer
  0 siblings, 1 reply; 14+ messages in thread
From: Hannes Reinecke @ 2016-02-16 15:47 UTC (permalink / raw)
  To: Sebastian Parschauer; +Cc: linux-raid@vger.kernel.org

Hi Sebastian,

while it's true in general that a 'change' event should not be sent
when a device is being removed or deleted, sending a 'remove' event
from userspace is most definitely wrong, too.
'remove' events should be generated from the kernel whenever a
device disappears from sysfs; it should never be generated from
userspace (as the device will still be present in sysfs).

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH 0/2] md/mdadm: Inform udev about device removal when stopping
@ 2016-02-16 14:44 Sebastian Parschauer
  2016-02-16 14:44 ` [PATCH 2/2] Manage: " Sebastian Parschauer
  0 siblings, 1 reply; 14+ messages in thread
From: Sebastian Parschauer @ 2016-02-16 14:44 UTC (permalink / raw)
  To: linux-raid
  Cc: Sebastian Parschauer, Shaohua Li, Jes Sorensen, Brassow Jonathan,
	Artur Paszkiewicz, NeilBrown, systemd-devel

When stopping an MD device, then its device node /dev/mdX may still
exist afterwards or it is recreated by udev. The next open() call
can lead to creation of an inoperable MD device. The reason for
this is that a change event (KOBJ_CHANGE) is announced to udev.
So announce a removal event (KOBJ_REMOVE) to udev instead.

Because of the support for kernels prior to 2.6.28, this change is
required in mdadm and the kernel. The udev event from mdadm
overrides the one from the kernel.

Sebastian Parschauer (2):
  md: Inform udev about device removal when stopping
  Manage: Inform udev about device removal when stopping

 drivers/md/md.c |    2 +-
 Manage.c        |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-02-17 17:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16 15:47 [PATCH 2/2] Manage: Inform udev about device removal when stopping Hannes Reinecke
2016-02-16 16:58 ` Sebastian Parschauer
  -- strict thread matches above, loose matches on Subject: below --
2016-02-16 14:44 [PATCH 0/2] md/mdadm: " Sebastian Parschauer
2016-02-16 14:44 ` [PATCH 2/2] Manage: " Sebastian Parschauer
2016-02-16 17:41   ` Jes Sorensen
2016-02-16 18:03     ` Sebastian Parschauer
2016-02-16 18:40       ` Hannes Reinecke
2016-02-16 18:52         ` Jes Sorensen
2016-02-16 20:46           ` NeilBrown
2016-02-16 22:02             ` Jes Sorensen
2016-02-17 10:31               ` Sebastian Parschauer
2016-02-17  7:03             ` Hannes Reinecke
2016-02-17 13:06               ` Jes Sorensen
2016-02-17 13:16                 ` Sebastian Parschauer
2016-02-17 17:33                   ` Jes Sorensen

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).