summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-07-05 01:14:14 +0000
committermav <mav@FreeBSD.org>2014-07-05 01:14:14 +0000
commit7ddcee78dba72755dc5a8037a0370444523d1491 (patch)
tree5ee7b04b77a7124a62805fdb5da10605b499175e
parent3b926638cff95aa21a2b08dd5139d30a4f181d08 (diff)
downloadFreeBSD-src-7ddcee78dba72755dc5a8037a0370444523d1491.zip
FreeBSD-src-7ddcee78dba72755dc5a8037a0370444523d1491.tar.gz
MFC r268178:
Fix bug in sync control in new "dev" mode of ZVOL (r265678). Don't check ZVOL_WCE flag, used in Solaris to control device "write cache". It is not applicable on FreeBSD and by default set to "disable".
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
index fb3789f..cc19e9b 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
@@ -1628,7 +1628,11 @@ zvol_write(struct cdev *dev, struct uio *uio, int ioflag)
}
#endif
+#ifdef sun
sync = !(zv->zv_flags & ZVOL_WCE) ||
+#else
+ sync =
+#endif
(zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS);
rl = zfs_range_lock(&zv->zv_znode, uio->uio_loffset, uio->uio_resid,
OpenPOWER on IntegriCloud