All of lore.kernel.org
 help / color / mirror / Atom feed
From: spam@streefland.xs4all.nl (Dick Streefland)
To: linux-raid@vger.kernel.org
Subject: Re: RAID1 recovery fails with 2.6 kernel
Date: Wed, 22 Oct 2003 18:59:36 -0000	[thread overview]
Message-ID: <5695.3f96d398.a61b9@altium.nl> (raw)
In-Reply-To: 1066844591.1260.31.camel@star2

Mike Tran <mhtran@us.ibm.com> wrote:
| I have been experiencing the same problem on my test machine.  I found
| out that the resync terminated early because of MD_RECOVERY_ER R bit set
| by raid1's sync_write_request().  I don't understand why it fails the
| sync when all the writes already completed successfully and quickly.  If
| there is a need to check for "nowhere to write this to" as in 2.4.x
| kernel, I think we need a different check.
| 
| The following patch for 2.6.0-test8 kernel seems to fix it.
| 
| --- a/raid1.c   2003-10-17 16:43:14.000000000 -0500
| +++ b/raid1.c   2003-10-22 11:57:59.350900256 -0500
| @@ -841,7 +841,7 @@
|         }
|  
|         if (atomic_dec_and_test(&r1_bio->remaining)) {
| -               md_done_sync(mddev, r1_bio->master_bio->bi_size >> 9, 0);
| +               md_done_sync(mddev, r1_bio->master_bio->bi_size >> 9, 1);
|                 put_buf(r1_bio);
|         }
|  }

This is exactly the spot where I interrupted my investigations last
night to get some sleep. I can confirm that your patch fixes the
problem. Thanks!

-- 
Dick Streefland                    ////               De Bilt
dick.streefland@xs4all.nl         (@ @)       The Netherlands
------------------------------oOO--(_)--OOo------------------


  reply	other threads:[~2003-10-22 18:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-19 14:27 RAID1 recovery fails with 2.6 kernel Dick Streefland
2003-10-20  6:15 ` Neil Brown
2003-10-20  8:43   ` Dick Streefland
2003-10-22 17:43     ` Mike Tran
2003-10-22 18:59       ` Dick Streefland [this message]
2003-10-26 20:36       ` Dick Streefland
2003-10-22 22:54   ` Kernel OOps: bad magic 0 while RAID5 resync operation Bo Moon

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=5695.3f96d398.a61b9@altium.nl \
    --to=spam@streefland.xs4all.nl \
    --cc=dick.streefland@xs4all.nl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.