From owner-svn-src-all@FreeBSD.ORG Sat Jul 23 22:11:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 311B2106564A; Sat, 23 Jul 2011 22:11:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 210958FC16; Sat, 23 Jul 2011 22:11:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6NMBftT078947; Sat, 23 Jul 2011 22:11:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6NMBfYR078945; Sat, 23 Jul 2011 22:11:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201107232211.p6NMBfYR078945@svn.freebsd.org> From: Alexander Motin Date: Sat, 23 Jul 2011 22:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224283 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jul 2011 22:11:41 -0000 Author: mav Date: Sat Jul 23 22:11:40 2011 New Revision: 224283 URL: http://svn.freebsd.org/changeset/base/224283 Log: Do not try to execute FLUSHCACHE on close and print extra messages for invalidated (considered lost) ada device. Exactly same already done for the da devices. Approved by: re (kib) MFC after: 1 week Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sat Jul 23 18:03:08 2011 (r224282) +++ head/sys/cam/ata/ata_da.c Sat Jul 23 22:11:40 2011 (r224283) @@ -425,7 +425,8 @@ adaclose(struct disk *dp) softc = (struct ada_softc *)periph->softc; /* We only sync the cache if the drive is capable of it. */ - if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) { + if ((softc->flags & ADA_FLAG_CAN_FLUSHCACHE) != 0 && + (softc->flags & ADA_FLAG_PACK_INVALID) == 0) { ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); cam_fill_ataio(&ccb->ataio, @@ -1361,7 +1362,8 @@ adadone(struct cam_periph *periph, union return; } if (error != 0) { - if (error == ENXIO) { + if (error == ENXIO && + (softc->flags & ADA_FLAG_PACK_INVALID) == 0) { /* * Catastrophic error. Mark our pack as * invalid.