summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2015-09-03 17:46:57 +0000
committersbruno <sbruno@FreeBSD.org>2015-09-03 17:46:57 +0000
commit590adc137eed43bdd9b9f6f9506aeef2d7281e31 (patch)
treebfefde6ae823f5ad1bbcdc47fd7101171a8d39a7
parent2e1c8d943da2dad8b3f7a312a2f2fcc7b49e290b (diff)
downloadFreeBSD-src-590adc137eed43bdd9b9f6f9506aeef2d7281e31.zip
FreeBSD-src-590adc137eed43bdd9b9f6f9506aeef2d7281e31.tar.gz
r249170 was just plain wrong. The effect of the change is to always
delete a logic volume on status change which is NOT what we want here. The original code is correct in that when the volume changes status the driver will only delete the volume if the status is one of the fatal errors. A drive failure in a mirrored volume is NOT a situtation where the volume should dissapear. Reported on freebsd-scsi@: https://lists.freebsd.org/pipermail/freebsd-scsi/2015-September/006800.html MFC after: 3 days
-rw-r--r--sys/dev/ciss/ciss.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 1b62b5f..974bf50 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -4016,8 +4016,7 @@ static void
ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn)
{
struct ciss_ldrive *ld;
- int bus, target;
- int rescan_ld;
+ int ostatus, bus, target;
debug_called(2);
@@ -4040,6 +4039,7 @@ ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn)
/*
* Update our idea of the drive's status.
*/
+ ostatus = ciss_decode_ldrive_status(cn->data.logical_status.previous_state);
ld->cl_status = ciss_decode_ldrive_status(cn->data.logical_status.new_state);
if (ld->cl_lstatus != NULL)
ld->cl_lstatus->status = cn->data.logical_status.new_state;
@@ -4047,9 +4047,7 @@ ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn)
/*
* Have CAM rescan the drive if its status has changed.
*/
- rescan_ld = (cn->data.logical_status.previous_state !=
- cn->data.logical_status.new_state) ? 1 : 0;
- if (rescan_ld) {
+ if (ostatus != ld->cl_status) {
ld->cl_update = 1;
ciss_notify_rescan_logical(sc);
}
OpenPOWER on IntegriCloud