ZFS vdev_file: use correct value for waitfor parameter of VOP_FSYNC

PR:		236475
Reported by:	asomers
MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2019-03-22 09:11:45 +00:00
parent 7de4bd92b8
commit c1581f4f4d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345410

View File

@ -239,8 +239,13 @@ vdev_file_io_start(zio_t *zio)
switch (zio->io_cmd) {
case DKIOCFLUSHWRITECACHE:
#ifdef illumos
zio->io_error = VOP_FSYNC(vf->vf_vnode, FSYNC | FDSYNC,
kcred, NULL);
#else
zio->io_error = VOP_FSYNC(vf->vf_vnode, MNT_WAIT,
kcred, NULL);
#endif
break;
default:
zio->io_error = SET_ERROR(ENOTSUP);