[PATCH] md - 1 of 3 - Remove some inappropriate MD_BUG calls when hot_removing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux