linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Luca Berra <bluca@comedia.it>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: [mdadm PATCH 9/9] allow redefinition of VAR_RUN
Date: Wed, 3 Mar 2010 12:53:37 +1100	[thread overview]
Message-ID: <20100303125337.41a844bf@notabene.brown> (raw)
In-Reply-To: <20100228144616.GH24781@maude.comedia.it>

On Sun, 28 Feb 2010 15:46:16 +0100
Luca Berra <bluca@comedia.it> wrote:

> having mdmon socket under var is painful at shutdown time

Thanks.  I have applied this after some minor modifications, just as
removing the "ifdef" stuff from Makefile and adding some commentary.

Thanks,
NeilBrown


> 
> Signed-off-by: Luca Berra <bluca@comedia.it>
> ---
>   Makefile |    8 ++++++--
>   mdadm.h  |    2 ++
>   mdmon.c  |    3 ---
>   3 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 1836b4b..1fffb26 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -62,9 +62,13 @@ CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)\" -DCONFFILE2=\"$(CONFFILE2)\"
>   # from early boot to late boot.
>   # If you don't have /lib/init/rw you might want to use /dev/.something
>   #  e.g. make ALT_RUN=/dev/.mdadm
> -ALT_RUN = /lib/init/rw
> +ifdef ALT_RUN
>   ALTFLAGS = -DALT_RUN=\"$(ALT_RUN)\"
> -CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(ALTFLAGS)
> +endif
> +ifdef VAR_RUN
> +VARFLAGS = -DVAR_RUN=\"$(VAR_RUN)\"
> +endif
> +CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(ALTFLAGS) $(VARFLAGS)
>   
>   # If you want a static binary, you might uncomment these
>   # LDFLAGS = -static
> diff --git a/mdadm.h b/mdadm.h
> index 825e3c2..2ad4a0e 100644
> --- a/mdadm.h
> +++ b/mdadm.h
> @@ -68,7 +68,9 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
>   #define DEFAULT_BITMAP_DELAY 5
>   #define DEFAULT_MAX_WRITE_BEHIND 256
>   
> +#ifndef VAR_RUN
>   #define VAR_RUN "/var/run/mdadm"
> +#endif /* VAR_RUN */
>   /* ALT_RUN should be somewhere that persists across the pivotroot
>    * from early boot to late boot.
>    * If you don't have /lib/init/rw you might want to use /dev/.something
> diff --git a/mdmon.c b/mdmon.c
> index b823a8c..6570637 100644
> --- a/mdmon.c
> +++ b/mdmon.c
> @@ -477,9 +477,6 @@ static int mdmon(char *devname, int devnum, int must_fork, int takeover)
>   		remove_pidfile(devname);
>   	}
>   	if (mkdir(VAR_RUN, 0600) >= 0 || (errno == EEXIST && access(VAR_RUN, W_OK) >= 0)) {
> -		/* try to clean up when we are finished with ALT_RUN dir */
> -		if (pid_dir != NULL)
> -			rmdir(pid_dir);
>   		pid_dir = VAR_RUN;
>   		remove_pidfile(devname);
>   	}


  reply	other threads:[~2010-03-03  1:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-27 15:05 [mdadm PATCH 0/2] *** mdmon fixes *** Luca Berra
2010-02-27 15:07 ` [mdadm PATCH 1/2] fix mdmon option parsing Luca Berra
2010-02-27 15:21   ` Luca Berra
2010-03-02  5:40   ` Neil Brown
2010-03-02  7:42     ` Luca Berra
2010-02-27 15:07 ` [mdadm PATCH 2/2] fix mdmon takeover Luca Berra
2010-03-03  0:52   ` Neil Brown
2010-02-28 14:41 ` [mdadm PATCH 0/2] *** mdmon fixes *** Luca Berra
2010-02-28 14:42   ` [mdadm PATCH 3/9] add missing newline to mdmon usage message Luca Berra
2010-02-28 14:42   ` [mdadm PATCH 4/9] mdmon: check select a writable pid_dir Luca Berra
2010-03-03  1:07     ` Neil Brown
2010-02-28 14:43   ` [mdadm PATCH 5/9] mdmon: mdmon_pid should return pid from either dir Luca Berra
2010-03-03  1:50     ` Neil Brown
2010-03-03  6:44       ` Luca Berra
2010-03-03  6:55         ` Neil Brown
2010-03-03  7:09           ` Luca Berra
2010-02-28 14:44   ` [mdadm PATCH 6/9] mdmon: connect_monitor should use socket " Luca Berra
2010-03-03  1:51     ` Neil Brown
2010-02-28 14:45   ` [mdadm PATCH 7/9] mdmon: move pid_dir to mdmon.c Luca Berra
2010-02-28 14:45   ` [mdadm PATCH 8/9] mdmon: rework startup and takeover logic Luca Berra
2010-03-03  1:52     ` Neil Brown
2010-03-03  6:48       ` Luca Berra
2010-02-28 14:46   ` [mdadm PATCH 9/9] allow redefinition of VAR_RUN Luca Berra
2010-03-03  1:53     ` Neil Brown [this message]
2010-02-28 15:41   ` [mdadm PATCH 0/2] *** mdmon fixes *** Bill Davidsen
2010-02-28 17:37     ` Luca Berra

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=20100303125337.41a844bf@notabene.brown \
    --to=neilb@suse.de \
    --cc=bluca@comedia.it \
    --cc=linux-raid@vger.kernel.org \
    /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).