svn commit: r308080 - in stable/11/sys/cam: ata scsi

Alexander Motin mav at FreeBSD.org
Sat Oct 29 08:47:24 UTC 2016


Author: mav
Date: Sat Oct 29 08:47:23 2016
New Revision: 308080
URL: https://svnweb.freebsd.org/changeset/base/308080

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/11/sys/cam/ata/ata_da.c
  stable/11/sys/cam/scsi/scsi_da.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ata/ata_da.c
==============================================================================
--- stable/11/sys/cam/ata/ata_da.c	Sat Oct 29 08:45:39 2016	(r308079)
+++ stable/11/sys/cam/ata/ata_da.c	Sat Oct 29 08:47:23 2016	(r308080)
@@ -926,8 +926,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/11/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/11/sys/cam/scsi/scsi_da.c	Sat Oct 29 08:45:39 2016	(r308079)
+++ stable/11/sys/cam/scsi/scsi_da.c	Sat Oct 29 08:47:23 2016	(r308080)
@@ -1492,8 +1492,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);
 		}
 


More information about the svn-src-all mailing list