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;