diff options
author | sbruno <sbruno@FreeBSD.org> | 2013-04-05 21:13:39 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2013-04-05 21:13:39 +0000 |
commit | 26c6d60005b943f5ec7663b012be1e06905ac5f5 (patch) | |
tree | e82ed658308bb804bc52817be1ed8807229b0970 /sys/dev/ciss/ciss.c | |
parent | 49b5e1ded608676fcfc4976e382a2aa0c7248f92 (diff) | |
download | FreeBSD-src-26c6d60005b943f5ec7663b012be1e06905ac5f5.zip FreeBSD-src-26c6d60005b943f5ec7663b012be1e06905ac5f5.tar.gz |
Notify CAM on state* change to a logical volume not status. This resolves
the issues reported regarding camcontrol devlist not showing the rebuild
states of volumes unless an explicit camcontrol rescan was executed.
PR: kern/171650
Reviewed by: scottl@freebsd.org
Obtained from: Yahoo! Inc.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/ciss/ciss.c')
-rw-r--r-- | sys/dev/ciss/ciss.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 78baafc..c023f39 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -3959,7 +3959,8 @@ static void ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn) { struct ciss_ldrive *ld; - int ostatus, bus, target; + int bus, target; + int rescan_ld; debug_called(2); @@ -3982,7 +3983,6 @@ 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; @@ -3990,7 +3990,9 @@ ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn) /* * Have CAM rescan the drive if its status has changed. */ - if (ostatus != ld->cl_status) { + rescan_ld = (cn->data.logical_status.previous_state != + cn->data.logical_status.new_state) ? 1 : 0; + if (rescan_ld) { ld->cl_update = 1; ciss_notify_rescan_logical(sc); } |