{
itx_wr_state_t write_state;
boolean_t slogging;
+ uintptr_t fsync_cnt;
ssize_t immediate_write_sz;
if (zil_replaying(zilog, tx) || zp->z_unlinked)
else
write_state = WR_NEED_COPY;
+ if ((fsync_cnt = (uintptr_t)tsd_get(zfs_fsyncer_key)) != 0) {
+ (void) tsd_set(zfs_fsyncer_key, (void *)(fsync_cnt - 1));
+ }
+
while (resid) {
itx_t *itx;
lr_write_t *lr;
itx->itx_private = ZTOZSB(zp);
- if (!(ioflag & (FSYNC | FDSYNC)) && (zp->z_sync_cnt == 0))
+ if (!(ioflag & (FSYNC | FDSYNC)) && (zp->z_sync_cnt == 0) &&
+ (fsync_cnt == 0))
itx->itx_sync = B_FALSE;
zil_itx_assign(zilog, itx, tx);