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".

MFC after:	3 days
This commit is contained in:
mav 2014-07-02 21:25:32 +00:00
parent 64183bccee
commit 4618d6ea2b

View File

@ -1629,7 +1629,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,