diff options
author | mav <mav@FreeBSD.org> | 2016-10-29 08:48:01 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-10-29 08:48:01 +0000 |
commit | d5312376b8ccc58ac3f3f3556dc5cd49c73b3b95 (patch) | |
tree | 6cc659caa668df9faee5deeead8f1793a34f22fa | |
parent | f67b5c02e0b7d5ab71c5c7229c8a77a4994eea05 (diff) | |
download | FreeBSD-src-d5312376b8ccc58ac3f3f3556dc5cd49c73b3b95.zip FreeBSD-src-d5312376b8ccc58ac3f3f3556dc5cd49c73b3b95.tar.gz |
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.
-rw-r--r-- | sys/cam/ata/ata_da.c | 3 | ||||
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index a374a16..daa2ebf 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -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); } diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index c85f9f3..8874285 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -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); } |