linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Andre Noll <maan@systemlinux.org>
Cc: Artur Wojcik <artur.wojcik@intel.com>,
	linux-raid@vger.kernel.org, dan.j.williams@intel.com,
	ed.ciechanowski@intel.com
Subject: Re: [mdadm PATCH] Kill: fix when zeroing busy devices.
Date: Fri, 29 Jan 2010 21:02:02 +1100	[thread overview]
Message-ID: <20100129210202.35b20639@notabene> (raw)
In-Reply-To: <20100128163157.GT7517@skl-net.de>

On Thu, 28 Jan 2010 17:31:57 +0100
Andre Noll <maan@systemlinux.org> wrote:

> On 16:48, Artur Wojcik wrote:
> > mdadm should not wait indefinitely when it trys to reset
> > superblock on device which is busy (cannot be opened).

Thanks.

> > 
> > Signed-off-by: Artur Wojcik <artur.wojcik@intel.com>
> > ---
> >  Kill.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/Kill.c b/Kill.c
> > index 63442a6..a65b865 100644
> > --- a/Kill.c
> > +++ b/Kill.c
> > @@ -46,7 +46,7 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
> >  			fprintf(stderr, Name ": Couldn't open %s for write - not zeroing\n",
> >  				dev);
> >  		close(fd);
> > -		return 1;
> > +		return 2;
> >  	}
> >  	if (st == NULL)
> >  		st = guess_super(fd);
> 
> Jup.
> 
> 	Acked-by: Andre Noll <maan@systemlinux.org>
> 
> BTW: Mind to kill the close(fd) as well (as fd is negative) while
> we're at it? A comment that explains the meaning of the return value
> would also be nice.

Done and done.

I really don't know why the loop in mdadm.c cared about the different
possible return values - I cannot see any justification for it.

Thanks,
NeilBrown


      reply	other threads:[~2010-01-29 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 15:48 [mdadm PATCH] Kill: fix when zeroing busy devices Artur Wojcik
2010-01-28 16:31 ` Andre Noll
2010-01-29 10:02   ` Neil Brown [this message]

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=20100129210202.35b20639@notabene \
    --to=neilb@suse.de \
    --cc=artur.wojcik@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=maan@systemlinux.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).