From owner-svn-src-all@freebsd.org Sat Oct 29 08:47:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8F32C244AE; Sat, 29 Oct 2016 08:47:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77E07F1C; Sat, 29 Oct 2016 08:47:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9T8lNnc097431; Sat, 29 Oct 2016 08:47:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9T8lNGI097429; Sat, 29 Oct 2016 08:47:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201610290847.u9T8lNGI097429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 29 Oct 2016 08:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r308080 - in stable/11/sys/cam: ata scsi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2016 08:47:24 -0000 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); }