--- a/usr/src/uts/common/fs/zfs/zfs_log.c Wed Apr 09 19:05:30 2008 -0700
+++ b/usr/src/uts/common/fs/zfs/zfs_log.c Wed Apr 09 19:59:39 2008 -0700
@@ -464,7 +464,7 @@
* its block pointer is put in the log record.
* WR_COPIED:
* If we know we'll immediately be committing the
- * transaction (FDSYNC (O_DSYNC)), the we allocate a larger
+ * transaction (FSYNC or FDSYNC), the we allocate a larger
* log record here for the data and copy the data in.
* WR_NEED_COPY:
* Otherwise we don't allocate a buffer, and *if* we need to
@@ -474,7 +474,7 @@
slogging = spa_has_slogs(zilog->zl_spa);
if (resid > zfs_immediate_write_sz && !slogging)
write_state = WR_INDIRECT;
- else if (ioflag & FDSYNC)
+ else if (ioflag & (FSYNC | FDSYNC))
write_state = WR_COPIED;
else
write_state = WR_NEED_COPY;
@@ -521,7 +521,8 @@
itx->itx_private = zp->z_zfsvfs;
- if ((zp->z_sync_cnt != 0) || (fsync_cnt != 0))
+ if ((zp->z_sync_cnt != 0) || (fsync_cnt != 0) ||
+ (ioflag & (FSYNC | FDSYNC)))
itx->itx_sync = B_TRUE;
else
itx->itx_sync = B_FALSE;