]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ZFS Reads may result in unneccesary calls to zil_commit
authorGeorge Wilson <gwilson@zfsmail.com>
Fri, 22 Mar 2019 20:09:11 +0000 (16:09 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 22 Mar 2019 20:09:11 +0000 (13:09 -0700)
commit2efea7c82c5741a50b476bb1dcbc9a74b8f73ad1
treea7f5e66611882cd43d729d23591248a1208ed692
parent060f0226e6396a3c7104fedc8d2af7063a27c1f9
ZFS Reads may result in unneccesary calls to zil_commit

ZFS supports O_RSYNC for read operations and when specified will ensure
the same level of data integrity that O_DSYNC and O_SYNC provides for
writes. O_RSYNC by itself has no effect so it must be combined with
either O_DSYNC or O_SYNC. However, many platforms don't support O_RSYNC
and have mapped O_SYNC to mean O_RSYNC within ZFS. This is incorrect
and causes unnecessary calls to zil_commit. Only platforms which
support O_RSYNC should implement the zil_commit functionality in the
read code path.

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Wilson <george.wilson@delphix.com>
Closes #8523
include/spl/sys/vnode.h
lib/libspl/include/sys/file.h
module/zfs/zfs_vnops.c