From: NeilBrown <neilb@suse.de>
To: Michal Soltys <soltys@ziu.info>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] udev rules: use $tempnode, check for supported types, comments
Date: Mon, 19 Sep 2011 13:12:50 +1000 [thread overview]
Message-ID: <20110919131250.070a5002@notabene.brown> (raw)
In-Reply-To: <1315466708-5431-2-git-send-email-soltys@ziu.info>
[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]
On Thu, 8 Sep 2011 09:25:08 +0200 Michal Soltys <soltys@ziu.info> wrote:
> Few things adjusted in addition to
> 0f82fe603a42f37f1e2a6f826b4164811bf2d188:
>
> - keep strict tests for supported types
> - when accessing the device, use $tempnode
> - few more comments
>
> Signed-off-by: Michal Soltys <soltys@ziu.info>
> ---
> udev-md-raid.rules | 17 +++++++++++++----
> 1 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/udev-md-raid.rules b/udev-md-raid.rules
> index e251ac5..f564f70 100644
> --- a/udev-md-raid.rules
> +++ b/udev-md-raid.rules
> @@ -2,10 +2,19 @@
>
> SUBSYSTEM!="block", GOTO="md_end"
>
> -# handle potential components of arrays
> -ENV{ID_FS_TYPE}=="*_raid_member", ENV{ID_PATH}!="", ACTION=="remove", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
> -ENV{ID_FS_TYPE}=="*_raid_member", ENV{ID_PATH}=="", ACTION=="remove", RUN+="/sbin/mdadm -If $name"
> -ENV{ID_FS_TYPE}=="*_raid_member", ACTION=="add", RUN+="/sbin/mdadm --incremental $env{DEVNAME}"
> +# handle potential components of arrays (the ones supported by md)
> +ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_inc"
> +GOTO="md_inc_skip"
> +
> +LABEL="md_inc"
> +
> +# remember you can limit what gets auto/incrementally assembled by
> +# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
> +ACTION=="add", RUN+="/sbin/mdadm --incremental $tempnode"
> +ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
> +ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"
> +
> +LABEL="md_inc_skip"
>
> # handle md arrays
> ACTION!="add|change", GOTO="md_end"
Thanks.
I've applied this... though I must admit that I don't really like all the
GOTOs - but that is reall
y the fault of udev I expect.
What was the rational for changing
==""
to
!="?*"
??
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2011-09-19 3:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-04 12:42 [PATCH 0/2] udev rules behaviour Michal Soltys
2011-09-04 12:42 ` [PATCH 1/2] udev rules: don't incrementally autoassemble everything Michal Soltys
2011-09-04 12:42 ` [PATCH 2/2] shorten remove rules Michal Soltys
2011-09-06 21:39 ` v2 - keep incremental, check types Michal Soltys
2011-09-06 21:39 ` [PATCH] udev rules: add ddf, shorten checks, use $tempnode Michal Soltys
2011-09-07 4:00 ` [PATCH 0/2] udev rules behaviour NeilBrown
2011-09-08 7:25 ` v2 once more, for current head Michal Soltys
2011-09-08 7:25 ` [PATCH] udev rules: use $tempnode, check for supported types, comments Michal Soltys
2011-09-19 3:12 ` NeilBrown [this message]
2011-09-19 7:23 ` Michal Soltys
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=20110919131250.070a5002@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=soltys@ziu.info \
/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).