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.
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to