summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_log.c
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2019-11-21 09:32:57 -0800
committerBrian Behlendorf <[email protected]>2019-11-21 09:32:57 -0800
commitda92d5cbb38cea3a860b8a6bb8ee21f9129e7d7c (patch)
treecc2d84b481a30b43d4097603e79a55a1975b0b64 /module/zfs/zfs_log.c
parent67a6c3bc9ff401fa04bc41354c5172b51aaed1c9 (diff)
Add zfs_file_* interface, remove vnodes
Provide a common zfs_file_* interface which can be implemented on all platforms to perform normal file access from either the kernel module or the libzpool library. This allows all non-portable vnode_t usage in the common code to be replaced by the new portable zfs_file_t. The associated vnode and kobj compatibility functions, types, and macros have been removed from the SPL. Moving forward, vnodes should only be used in platform specific code when provided by the native operating system. Reviewed-by: Sean Eric Fagan <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #9556
Diffstat (limited to 'module/zfs/zfs_log.c')
-rw-r--r--module/zfs/zfs_log.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/module/zfs/zfs_log.c b/module/zfs/zfs_log.c
index 8b7c594f8..9cf55c29b 100644
--- a/module/zfs/zfs_log.c
+++ b/module/zfs/zfs_log.c
@@ -39,7 +39,6 @@
#include <sys/byteorder.h>
#include <sys/policy.h>
#include <sys/stat.h>
-#include <sys/mode.h>
#include <sys/acl.h>
#include <sys/dmu.h>
#include <sys/dbuf.h>
@@ -528,7 +527,7 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
else if (!spa_has_slogs(zilog->zl_spa) &&
resid >= zfs_immediate_write_sz)
write_state = WR_INDIRECT;
- else if (ioflag & (FSYNC | FDSYNC))
+ else if (ioflag & (O_SYNC | O_DSYNC))
write_state = WR_COPIED;
else
write_state = WR_NEED_COPY;
@@ -578,7 +577,7 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
itx->itx_private = ZTOZSB(zp);
- if (!(ioflag & (FSYNC | FDSYNC)) && (zp->z_sync_cnt == 0) &&
+ if (!(ioflag & (O_SYNC | O_DSYNC)) && (zp->z_sync_cnt == 0) &&
(fsync_cnt == 0))
itx->itx_sync = B_FALSE;