From: Tim Hockin <thockin@sun.com>
To: mingo@redhat.com, neilb@cse.unsw.edu.au,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
alan@redhat.com, torvalds@transmeta.com
Subject: [PATCH] misc minor md fixes
Date: Mon, 15 Oct 2001 19:07:42 -0700 [thread overview]
Message-ID: <3BCB966E.82600865@sun.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
All,
Attached is a small patch to fix up some md issues we've run across.
The changes are pretty obvious, and were needed here - please apply. Let
me know if there is a problem with them.
Thanks
Tim
--
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.com
[-- Attachment #2: md-misc.diff --]
[-- Type: text/plain, Size: 2502 bytes --]
diff -ruN dist-2.4.12+patches/drivers/md/md.c cvs-2.4.12+patches/drivers/md/md.c
--- dist-2.4.12+patches/drivers/md/md.c Mon Oct 15 10:21:57 2001
+++ cvs-2.4.12+patches/drivers/md/md.c Mon Oct 15 10:21:57 2001
@@ -542,8 +542,10 @@
goto abort;
}
- if (calc_sb_csum(sb) != sb->sb_csum)
+ if (calc_sb_csum(sb) != sb->sb_csum) {
printk(BAD_CSUM, partition_name(rdev->dev));
+ goto abort;
+ }
ret = 0;
abort:
return ret;
diff -ruN dist-2.4.12+patches/drivers/md/raid1.c cvs-2.4.12+patches/drivers/md/raid1.c
--- dist-2.4.12+patches/drivers/md/raid1.c Mon Oct 15 10:21:58 2001
+++ cvs-2.4.12+patches/drivers/md/raid1.c Mon Oct 15 10:21:57 2001
@@ -1690,7 +1690,8 @@
}
}
- if (!start_recovery && !(sb->state & (1 << MD_SB_CLEAN))) {
+ if (!start_recovery && !(sb->state & (1 << MD_SB_CLEAN)) &&
+ (conf->working_disks > 1)) {
const char * name = "raid1syncd";
conf->resync_thread = md_register_thread(raid1syncd, conf,name);
diff -ruN dist-2.4.12+patches/drivers/md/raid5.c cvs-2.4.12+patches/drivers/md/raid5.c
--- dist-2.4.12+patches/drivers/md/raid5.c Mon Oct 15 10:21:58 2001
+++ cvs-2.4.12+patches/drivers/md/raid5.c Mon Oct 15 10:21:57 2001
@@ -488,22 +488,24 @@
PRINTK("raid5_error called\n");
for (i = 0, disk = conf->disks; i < conf->raid_disks; i++, disk++) {
- if (disk->dev == dev && disk->operational) {
- disk->operational = 0;
- mark_disk_faulty(sb->disks+disk->number);
- mark_disk_nonsync(sb->disks+disk->number);
- mark_disk_inactive(sb->disks+disk->number);
- sb->active_disks--;
- sb->working_disks--;
- sb->failed_disks++;
- mddev->sb_dirty = 1;
- conf->working_disks--;
- conf->failed_disks++;
- md_wakeup_thread(conf->thread);
- printk (KERN_ALERT
- "raid5: Disk failure on %s, disabling device."
- " Operation continuing on %d devices\n",
- partition_name (dev), conf->working_disks);
+ if (disk->dev == dev) {
+ if (disk->operational) {
+ disk->operational = 0;
+ mark_disk_faulty(sb->disks+disk->number);
+ mark_disk_nonsync(sb->disks+disk->number);
+ mark_disk_inactive(sb->disks+disk->number);
+ sb->active_disks--;
+ sb->working_disks--;
+ sb->failed_disks++;
+ mddev->sb_dirty = 1;
+ conf->working_disks--;
+ conf->failed_disks++;
+ md_wakeup_thread(conf->thread);
+ printk (KERN_ALERT
+ "raid5: Disk failure on %s, disabling device."
+ " Operation continuing on %d devices\n",
+ partition_name (dev), conf->working_disks);
+ }
return 0;
}
}
reply other threads:[~2001-10-16 2:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3BCB966E.82600865@sun.com \
--to=thockin@sun.com \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=neilb@cse.unsw.edu.au \
--cc=torvalds@transmeta.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 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.