Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2011 22:11:41 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224283 - head/sys/cam/ata
Message-ID:  <201107232211.p6NMBfYR078945@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



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