Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 2015 17:20:12 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r287566 - stable/10/sys/dev/ciss
Message-ID:  <201509081720.t88HKCH0098500@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Tue Sep  8 17:20:12 2015
New Revision: 287566
URL: https://svnweb.freebsd.org/changeset/base/287566

Log:
  MFC r287437
  
  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

Modified:
  stable/10/sys/dev/ciss/ciss.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/ciss/ciss.c
==============================================================================
--- stable/10/sys/dev/ciss/ciss.c	Tue Sep  8 16:06:04 2015	(r287565)
+++ stable/10/sys/dev/ciss/ciss.c	Tue Sep  8 17:20:12 2015	(r287566)
@@ -4018,8 +4018,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);
 
@@ -4042,6 +4041,7 @@ ciss_notify_logical(struct ciss_softc *s
 	    /*
 	     * 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;
@@ -4049,9 +4049,7 @@ ciss_notify_logical(struct ciss_softc *s
 	    /*
 	     * 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);
 	    }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509081720.t88HKCH0098500>