Author: mav
Date: Sat Oct 29 08:48:01 2016
New Revision: 308081
URL: https://svnweb.freebsd.org/changeset/base/308081

Log:
  MFC r307507, r307509, r307515:
  Consider device as clean even if SYNCHRONIZE CACHE failed.
  
  If device reservation was preempted by other initiator, our sync request
  will always fail.  Without this change CAM tried to sync cache on every
  following device close, including numerous GEOM tasting opens/closes,
  causing lots of useless noise in logs.

Modified:
  stable/10/sys/cam/ata/ata_da.c
  stable/10/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ata/ata_da.c
==============================================================================
--- stable/10/sys/cam/ata/ata_da.c      Sat Oct 29 08:47:23 2016        
(r308080)
+++ stable/10/sys/cam/ata/ata_da.c      Sat Oct 29 08:48:01 2016        
(r308081)
@@ -707,8 +707,7 @@ adaclose(struct disk *dp)
 
                if (error != 0)
                        xpt_print(periph->path, "Synchronize cache failed\n");
-               else
-                       softc->flags &= ~ADA_FLAG_DIRTY;
+               softc->flags &= ~ADA_FLAG_DIRTY;
                xpt_release_ccb(ccb);
                cam_periph_unhold(periph);
        }

Modified: stable/10/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_da.c    Sat Oct 29 08:47:23 2016        
(r308080)
+++ stable/10/sys/cam/scsi/scsi_da.c    Sat Oct 29 08:48:01 2016        
(r308081)
@@ -1375,8 +1375,7 @@ daclose(struct disk *dp)
                        error = cam_periph_runccb(ccb, daerror, /*cam_flags*/0,
                            /*sense_flags*/SF_RETRY_UA | SF_QUIET_IR,
                            softc->disk->d_devstat);
-                       if (error == 0)
-                               softc->flags &= ~DA_FLAG_DIRTY;
+                       softc->flags &= ~DA_FLAG_DIRTY;
                        xpt_release_ccb(ccb);
                }
 
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to