diff options
Diffstat (limited to 'sys/contrib/openzfs/module/zfs/zfs_log.c')
| -rw-r--r-- | sys/contrib/openzfs/module/zfs/zfs_log.c | 20 | 
1 files changed, 4 insertions, 16 deletions
| diff --git a/sys/contrib/openzfs/module/zfs/zfs_log.c b/sys/contrib/openzfs/module/zfs/zfs_log.c index 2ce25b72b288..ea17e049279f 100644 --- a/sys/contrib/openzfs/module/zfs/zfs_log.c +++ b/sys/contrib/openzfs/module/zfs/zfs_log.c @@ -607,8 +607,6 @@ zfs_log_rename_whiteout(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,   * called as soon as the write is on stable storage (be it via a DMU sync or a   * ZIL commit).   */ -static uint_t zfs_immediate_write_sz = 32768; -  void  zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,      znode_t *zp, offset_t off, ssize_t resid, boolean_t commit, @@ -622,19 +620,12 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,  	if (zil_replaying(zilog, tx) || zp->z_unlinked ||  	    zfs_xattr_owner_unlinked(zp)) {  		if (callback != NULL) -			callback(callback_data); +			callback(callback_data, 0);  		return;  	} -	if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT || o_direct) -		write_state = WR_INDIRECT; -	else if (!spa_has_slogs(zilog->zl_spa) && -	    resid >= zfs_immediate_write_sz) -		write_state = WR_INDIRECT; -	else if (commit) -		write_state = WR_COPIED; -	else -		write_state = WR_NEED_COPY; +	write_state = zil_write_state(zilog, resid, blocksize, o_direct, +	    commit);  	(void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(ZTOZSB(zp)), &gen,  	    sizeof (gen)); @@ -672,7 +663,7 @@ zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,  			    DMU_KEEP_CACHING);  			DB_DNODE_EXIT(db);  			if (err != 0) { -				zil_itx_destroy(itx); +				zil_itx_destroy(itx, 0);  				itx = zil_itx_create(txtype, sizeof (*lr));  				lr = (lr_write_t *)&itx->itx_lr;  				wr_state = WR_NEED_COPY; @@ -938,6 +929,3 @@ zfs_log_clone_range(zilog_t *zilog, dmu_tx_t *tx, int txtype, znode_t *zp,  		len -= partlen;  	}  } - -ZFS_MODULE_PARAM(zfs, zfs_, immediate_write_sz, UINT, ZMOD_RW, -	"Largest data block to write to zil"); | 
