Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Oct 2016 08:48:01 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r308081 - in stable/10/sys/cam: ata scsi
Message-ID:  <201610290848.u9T8m18d097508@repo.freebsd.org>

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



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