linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: linux-raid <linux-raid@vger.kernel.org>
Cc: Neil Brown <neilb@suse.de>, linux-kernel <linux-kernel@vger.kernel.org>
Subject: [bug?] raid1 integrity checking is broken on 2.6.18-rc4
Date: Sat, 12 Aug 2006 02:49:24 -0400	[thread overview]
Message-ID: <200608120252_MC3-1-C7DD-BA91@compuserve.com> (raw)

Doing this on a raid1 array:
        echo "check" >/sys/block/md0/md/sync_action

On 2.6.16.27:
        Activity lights on both mirrors show activity for a while,
        then the array status prints on the console.

On 2.6.18-rc4 + the below patch:
        Drive activity light blinks once on one drive, then the
        array status prints (obviously no checking takes place.)


Applied hotfix on 2.6.18-rc4:

--- .prev/drivers/md/md.c       2006-08-08 09:00:44.000000000 +1000
+++ ./drivers/md/md.c   2006-08-08 09:04:04.000000000 +1000
@@ -1597,6 +1597,19 @@ void md_update_sb(mddev_t * mddev)
 
 repeat:
        spin_lock_irq(&mddev->write_lock);
+
+       if (mddev->degraded && mddev->sb_dirty == 3)
+               /* If the array is degraded, then skipping spares is both
+                * dangerous and fairly pointless.
+                * Dangerous because a device that was removed from the array
+                * might have a event_count that still looks up-to-date,
+                * so it can be re-added without a resync.
+                * Pointless because if there are any spares to skip,
+                * then a recovery will happen and soon that array won't
+                * be degraded any more and the spare can go back to sleep then.
+                */
+               mddev->sb_dirty = 1;
+
        sync_req = mddev->in_sync;
        mddev->utime = get_seconds();
        if (mddev->sb_dirty == 3)
-- 
Chuck


             reply	other threads:[~2006-08-12  6:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-12  6:49 Chuck Ebbert [this message]
2006-08-12  9:13 ` [bug?] raid1 integrity checking is broken on 2.6.18-rc4 Justin Piszcz
2006-08-12 11:59   ` Michael Tokarev
2006-08-14  6:14 ` Neil Brown
  -- strict thread matches above, loose matches on Subject: below --
2006-08-17 20:03 Chuck Ebbert
2006-08-28  3:47 ` Neil Brown
2006-08-18 16:38 raid

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=200608120252_MC3-1-C7DD-BA91@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).