From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harald Hoyer Date: Thu, 05 Feb 2009 11:39:12 +0000 Subject: Re: MD removal and condition code bug Message-Id: <498ACFE0.1070608@redhat.com> List-Id: References: <498A9893.5090505@redhat.com> In-Reply-To: <498A9893.5090505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Kay Sievers wrote: > On Thu, Feb 5, 2009 at 08:43, Harald Hoyer wrote: >> Radek Vykydal encountered a problem with md devices. >> If the raid is about to be removed a "change" and "remove" event is sent. >> The "change" event has to be skipped if ATTR{md/array_state} is empty, but >> somehow the condition does not match, which might point to a bug in the >> condition code. >> The following patch is needed: >> >> < ATTR{md/array_state}="|clear|inactive", GOTO="md_end" >> --- >>> ATTR{md/array_state}="clear|inactive", GOTO="md_end" >>> ATTR(md/array_state}!="?*", GOTO="md_end" > > A non-existent attribute makes the rule always fail. Are you sure, the > second rule will fix the issue? It should also never match, when the > attribute is no longer available. I guess, we need to add a TEST!= key > here. > > Thanks, > Kay The attribute exists, but is empty.