From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shaohua Li Subject: Re: [PATCH] md: Drop sending a change uevent when stopping Date: Wed, 17 Feb 2016 10:19:43 -0800 Message-ID: <20160217181943.GA28011@kernel.org> References: <1455726300-20340-1-git-send-email-sebastian.riemer@profitbricks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1455726300-20340-1-git-send-email-sebastian.riemer@profitbricks.com> Sender: linux-raid-owner@vger.kernel.org To: Sebastian Parschauer Cc: linux-raid , Jes Sorensen , Brassow Jonathan , Artur Paszkiewicz , NeilBrown , Hannes Reinecke , systemd-devel@freedesktop.org List-Id: linux-raid.ids On Wed, Feb 17, 2016 at 05:25:00PM +0100, Sebastian Parschauer wrote: > 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 sent to udev which > races against the remove event (KOBJ_REMOVE) from md_free(). > So drop sending the change event. > > A change is likely also required in mdadm as many versions send the > change event to udev as well. Makes sense, it's unlikely we need the CHANGE event. Applied. Thanks, Shaohua