* [PATCH] md - 1 of 3 - Remove some inappropriate MD_BUG calls when hot_removing
@ 2002-12-17 2:00 NeilBrown
0 siblings, 0 replies; only message in thread
From: NeilBrown @ 2002-12-17 2:00 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linux-raid
Marcelo,
This is the first of three patches for 2.4.21-pre that make smallish
improvements to md/raid.
Thanks, NeilBrown
If you try to hot-remove an active device, md will currently
print an MD_BUG message which is inappropriate and confusing.
This patch removes these.
----------- Diffstat output ------------
./drivers/md/md.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~ 2002-12-16 16:28:35.000000000 +1100
+++ ./drivers/md/md.c 2002-12-16 16:28:35.000000000 +1100
@@ -2337,20 +2337,16 @@ static int hot_remove_disk(mddev_t * mdd
return -EINVAL;
}
disk = &mddev->sb->disks[rdev->desc_nr];
- if (disk_active(disk)) {
- MD_BUG();
+ if (disk_active(disk))
goto busy;
- }
- if (disk_removed(disk)) {
- MD_BUG();
+
+ if (disk_removed(disk))
return -EINVAL;
- }
err = mddev->pers->diskop(mddev, &disk, DISKOP_HOT_REMOVE_DISK);
- if (err == -EBUSY) {
- MD_BUG();
+ if (err == -EBUSY)
goto busy;
- }
+
if (err) {
MD_BUG();
return -EINVAL;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-17 2:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-17 2:00 [PATCH] md - 1 of 3 - Remove some inappropriate MD_BUG calls when hot_removing NeilBrown
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).