From owner-svn-src-head@freebsd.org Thu Sep 3 17:46:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFC0B9C9631; Thu, 3 Sep 2015 17:46:58 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6819A53; Thu, 3 Sep 2015 17:46:58 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t83HkwbR072329; Thu, 3 Sep 2015 17:46:58 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t83HkwqW072328; Thu, 3 Sep 2015 17:46:58 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201509031746.t83HkwqW072328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 3 Sep 2015 17:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287437 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 17:46:59 -0000 Author: sbruno Date: Thu Sep 3 17:46:57 2015 New Revision: 287437 URL: https://svnweb.freebsd.org/changeset/base/287437 Log: 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 Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Thu Sep 3 17:01:58 2015 (r287436) +++ head/sys/dev/ciss/ciss.c Thu Sep 3 17:46:57 2015 (r287437) @@ -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 *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; @@ -4047,9 +4047,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); }