linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, pyu@redhat.com
Subject: Re: [PATCH] Fix race between removing raid1 device and I/O error handling on underlying device
Date: Tue, 09 Oct 2012 08:39:11 +0200	[thread overview]
Message-ID: <wrfj1uh8kv3k.fsf@redhat.com> (raw)
In-Reply-To: <20121009115822.50e5f305@notabene.brown> (NeilBrown's message of "Tue, 9 Oct 2012 11:58:22 +1100")

NeilBrown <neilb@suse.de> writes:
>> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
>> index 611b5f7..ffdad74 100644
>> --- a/drivers/md/raid1.c
>> +++ b/drivers/md/raid1.c
>> @@ -2005,7 +2005,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk,
>>  		if (!success) {
>>  			/* Cannot read from anywhere - mark it bad */
>>  			struct md_rdev *rdev = conf->mirrors[read_disk].rdev;
>> -			if (!rdev_set_badblocks(rdev, sect, s, 0))
>> +			if (rdev && !rdev_set_badblocks(rdev, sect, s, 0))
>>  				md_error(mddev, rdev);
>>  			break;
>>  		}
>
>
> Hi Jes,
> this was already reported on linux-raid and I said I didn't like that fix
> because I think it is wrong that the rdev could be removed while we are
> trying to fix a read error on it.
> So I've applied this following which is in -next.
>
> NeilBrown

Hi Neil,

Whoops, I have to admit I am somewhat backlogged on linux-raid.
Apologies for the noise.

I wasn't wildly happy with the solution myself, but I figured it was the
simplest solution. 

Your patch looks good to me, so I'll go with that.

Cheers,
Jes

      reply	other threads:[~2012-10-09  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 13:57 [PATCH] Fix race between removing raid1 device and I/O error handling on underlying device Jes.Sorensen
2012-10-09  0:58 ` NeilBrown
2012-10-09  6:39   ` Jes Sorensen [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=wrfj1uh8kv3k.fsf@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=pyu@redhat.com \
    /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).