diff options
author | mav <mav@FreeBSD.org> | 2014-07-05 01:14:14 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-07-05 01:14:14 +0000 |
commit | 7ddcee78dba72755dc5a8037a0370444523d1491 (patch) | |
tree | 5ee7b04b77a7124a62805fdb5da10605b499175e | |
parent | 3b926638cff95aa21a2b08dd5139d30a4f181d08 (diff) | |
download | FreeBSD-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.c | 4 |
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, |