4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2015 by Delphix. All rights reserved.
27 #include <sys/types.h>
28 #include <sys/param.h>
29 #include <sys/sysmacros.h>
30 #include <sys/cmn_err.h>
32 #include <sys/thread.h>
35 #include <sys/zfs_znode.h>
36 #include <sys/zfs_dir.h>
38 #include <sys/zil_impl.h>
39 #include <sys/byteorder.h>
40 #include <sys/policy.h>
46 #include <sys/zfs_fuid.h>
47 #include <sys/dsl_dataset.h>
50 * These zfs_log_* functions must be called within a dmu tx, in one
51 * of 2 contexts depending on zilog->z_replay:
55 * We need to record the transaction so that if it is committed to
56 * the Intent Log then it can be replayed. An intent log transaction
57 * structure (itx_t) is allocated and all the information necessary to
58 * possibly replay the transaction is saved in it. The itx is then assigned
59 * a sequence number and inserted in the in-memory list anchored in the zilog.
63 * We need to mark the intent log record as replayed in the log header.
64 * This is done in the same transaction as the replay so that they
69 zfs_log_create_txtype(zil_create_t type, vsecattr_t *vsecp, vattr_t *vap)
71 int isxvattr = (vap->va_mask & ATTR_XVATTR);
74 if (vsecp == NULL && !isxvattr)
76 if (vsecp && isxvattr)
77 return (TX_CREATE_ACL_ATTR);
79 return (TX_CREATE_ACL);
81 return (TX_CREATE_ATTR);
84 if (vsecp == NULL && !isxvattr)
86 if (vsecp && isxvattr)
87 return (TX_MKDIR_ACL_ATTR);
89 return (TX_MKDIR_ACL);
91 return (TX_MKDIR_ATTR);
100 * build up the log data necessary for logging xvattr_t
101 * First lr_attr_t is initialized. following the lr_attr_t
102 * is the mapsize and attribute bitmap copied from the xvattr_t.
103 * Following the bitmap and bitmapsize two 64 bit words are reserved
104 * for the create time which may be set. Following the create time
105 * records a single 64 bit integer which has the bits to set on
106 * replay for the xvattr.
109 zfs_log_xvattr(lr_attr_t *lrattr, xvattr_t *xvap)
118 xoap = xva_getxoptattr(xvap);
121 lrattr->lr_attr_masksize = xvap->xva_mapsize;
122 bitmap = &lrattr->lr_attr_bitmap;
123 for (i = 0; i != xvap->xva_mapsize; i++, bitmap++) {
124 *bitmap = xvap->xva_reqattrmap[i];
127 /* Now pack the attributes up in a single uint64_t */
128 attrs = (uint64_t *)bitmap;
130 scanstamp = (caddr_t)(crtime + 2);
132 if (XVA_ISSET_REQ(xvap, XAT_READONLY))
133 *attrs |= (xoap->xoa_readonly == 0) ? 0 :
135 if (XVA_ISSET_REQ(xvap, XAT_HIDDEN))
136 *attrs |= (xoap->xoa_hidden == 0) ? 0 :
138 if (XVA_ISSET_REQ(xvap, XAT_SYSTEM))
139 *attrs |= (xoap->xoa_system == 0) ? 0 :
141 if (XVA_ISSET_REQ(xvap, XAT_ARCHIVE))
142 *attrs |= (xoap->xoa_archive == 0) ? 0 :
144 if (XVA_ISSET_REQ(xvap, XAT_IMMUTABLE))
145 *attrs |= (xoap->xoa_immutable == 0) ? 0 :
147 if (XVA_ISSET_REQ(xvap, XAT_NOUNLINK))
148 *attrs |= (xoap->xoa_nounlink == 0) ? 0 :
150 if (XVA_ISSET_REQ(xvap, XAT_APPENDONLY))
151 *attrs |= (xoap->xoa_appendonly == 0) ? 0 :
153 if (XVA_ISSET_REQ(xvap, XAT_OPAQUE))
154 *attrs |= (xoap->xoa_opaque == 0) ? 0 :
156 if (XVA_ISSET_REQ(xvap, XAT_NODUMP))
157 *attrs |= (xoap->xoa_nodump == 0) ? 0 :
159 if (XVA_ISSET_REQ(xvap, XAT_AV_QUARANTINED))
160 *attrs |= (xoap->xoa_av_quarantined == 0) ? 0 :
162 if (XVA_ISSET_REQ(xvap, XAT_AV_MODIFIED))
163 *attrs |= (xoap->xoa_av_modified == 0) ? 0 :
165 if (XVA_ISSET_REQ(xvap, XAT_CREATETIME))
166 ZFS_TIME_ENCODE(&xoap->xoa_createtime, crtime);
167 if (XVA_ISSET_REQ(xvap, XAT_AV_SCANSTAMP)) {
168 ASSERT(!XVA_ISSET_REQ(xvap, XAT_PROJID));
170 bcopy(xoap->xoa_av_scanstamp, scanstamp, AV_SCANSTAMP_SZ);
171 } else if (XVA_ISSET_REQ(xvap, XAT_PROJID)) {
173 * XAT_PROJID and XAT_AV_SCANSTAMP will never be valid
174 * at the same time, so we can share the same space.
176 bcopy(&xoap->xoa_projid, scanstamp, sizeof (uint64_t));
178 if (XVA_ISSET_REQ(xvap, XAT_REPARSE))
179 *attrs |= (xoap->xoa_reparse == 0) ? 0 :
181 if (XVA_ISSET_REQ(xvap, XAT_OFFLINE))
182 *attrs |= (xoap->xoa_offline == 0) ? 0 :
184 if (XVA_ISSET_REQ(xvap, XAT_SPARSE))
185 *attrs |= (xoap->xoa_sparse == 0) ? 0 :
187 if (XVA_ISSET_REQ(xvap, XAT_PROJINHERIT))
188 *attrs |= (xoap->xoa_projinherit == 0) ? 0 :
193 zfs_log_fuid_ids(zfs_fuid_info_t *fuidp, void *start)
196 uint64_t *fuidloc = start;
198 /* First copy in the ACE FUIDs */
199 for (zfuid = list_head(&fuidp->z_fuids); zfuid;
200 zfuid = list_next(&fuidp->z_fuids, zfuid)) {
201 *fuidloc++ = zfuid->z_logfuid;
208 zfs_log_fuid_domains(zfs_fuid_info_t *fuidp, void *start)
210 zfs_fuid_domain_t *zdomain;
212 /* now copy in the domain info, if any */
213 if (fuidp->z_domain_str_sz != 0) {
214 for (zdomain = list_head(&fuidp->z_domains); zdomain;
215 zdomain = list_next(&fuidp->z_domains, zdomain)) {
216 bcopy((void *)zdomain->z_domain, start,
217 strlen(zdomain->z_domain) + 1);
218 start = (caddr_t)start +
219 strlen(zdomain->z_domain) + 1;
226 * If zp is an xattr node, check whether the xattr owner is unlinked.
227 * We don't want to log anything if the owner is unlinked.
230 zfs_xattr_owner_unlinked(znode_t *zp)
236 * if zp is XATTR node, keep walking up via z_xattr_parent until we
239 while (zp->z_pflags & ZFS_XATTR) {
240 ASSERT3U(zp->z_xattr_parent, !=, 0);
241 if (zfs_zget(ZTOZSB(zp), zp->z_xattr_parent, &dzp) != 0) {
247 unlinked = zp->z_unlinked;
254 * Handles TX_CREATE, TX_CREATE_ATTR, TX_MKDIR, TX_MKDIR_ATTR and
255 * TK_MKXATTR transactions.
257 * TX_CREATE and TX_MKDIR are standard creates, but they may have FUID
258 * domain information appended prior to the name. In this case the
259 * uid/gid in the log record will be a log centric FUID.
261 * TX_CREATE_ACL_ATTR and TX_MKDIR_ACL_ATTR handle special creates that
262 * may contain attributes, ACL and optional fuid information.
264 * TX_CREATE_ACL and TX_MKDIR_ACL handle special creates that specify
265 * and ACL and normal users/groups in the ACEs.
267 * There may be an optional xvattr attribute information similar
268 * to zfs_log_setattr.
270 * Also, after the file name "domain" strings may be appended.
273 zfs_log_create(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
274 znode_t *dzp, znode_t *zp, char *name, vsecattr_t *vsecp,
275 zfs_fuid_info_t *fuidp, vattr_t *vap)
279 lr_acl_create_t *lracl;
283 xvattr_t *xvap = (xvattr_t *)vap;
286 size_t namesize = strlen(name) + 1;
289 if (zil_replaying(zilog, tx) || zfs_xattr_owner_unlinked(dzp))
293 * If we have FUIDs present then add in space for
294 * domains and ACE fuid's if any.
297 fuidsz += fuidp->z_domain_str_sz;
298 fuidsz += fuidp->z_fuid_cnt * sizeof (uint64_t);
301 if (vap->va_mask & ATTR_XVATTR)
302 xvatsize = ZIL_XVAT_SIZE(xvap->xva_mapsize);
304 if ((int)txtype == TX_CREATE_ATTR || (int)txtype == TX_MKDIR_ATTR ||
305 (int)txtype == TX_CREATE || (int)txtype == TX_MKDIR ||
306 (int)txtype == TX_MKXATTR) {
307 txsize = sizeof (*lr) + namesize + fuidsz + xvatsize;
308 lrsize = sizeof (*lr);
311 sizeof (lr_acl_create_t) + namesize + fuidsz +
312 ZIL_ACE_LENGTH(aclsize) + xvatsize;
313 lrsize = sizeof (lr_acl_create_t);
316 itx = zil_itx_create(txtype, txsize);
318 lr = (lr_create_t *)&itx->itx_lr;
319 lr->lr_doid = dzp->z_id;
320 lr->lr_foid = zp->z_id;
321 /* Store dnode slot count in 8 bits above object id. */
322 LR_FOID_SET_SLOTS(lr->lr_foid, zp->z_dnodesize >> DNODE_SHIFT);
323 lr->lr_mode = zp->z_mode;
324 if (!IS_EPHEMERAL(KUID_TO_SUID(ZTOI(zp)->i_uid))) {
325 lr->lr_uid = (uint64_t)KUID_TO_SUID(ZTOI(zp)->i_uid);
327 lr->lr_uid = fuidp->z_fuid_owner;
329 if (!IS_EPHEMERAL(KGID_TO_SGID(ZTOI(zp)->i_gid))) {
330 lr->lr_gid = (uint64_t)KGID_TO_SGID(ZTOI(zp)->i_gid);
332 lr->lr_gid = fuidp->z_fuid_group;
334 (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(ZTOZSB(zp)), &lr->lr_gen,
336 (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_CRTIME(ZTOZSB(zp)),
337 lr->lr_crtime, sizeof (uint64_t) * 2);
339 if (sa_lookup(zp->z_sa_hdl, SA_ZPL_RDEV(ZTOZSB(zp)), &lr->lr_rdev,
340 sizeof (lr->lr_rdev)) != 0)
344 * Fill in xvattr info if any
346 if (vap->va_mask & ATTR_XVATTR) {
347 zfs_log_xvattr((lr_attr_t *)((caddr_t)lr + lrsize), xvap);
348 end = (caddr_t)lr + lrsize + xvatsize;
350 end = (caddr_t)lr + lrsize;
353 /* Now fill in any ACL info */
356 lracl = (lr_acl_create_t *)&itx->itx_lr;
357 lracl->lr_aclcnt = vsecp->vsa_aclcnt;
358 lracl->lr_acl_bytes = aclsize;
359 lracl->lr_domcnt = fuidp ? fuidp->z_domain_cnt : 0;
360 lracl->lr_fuidcnt = fuidp ? fuidp->z_fuid_cnt : 0;
361 if (vsecp->vsa_aclflags & VSA_ACE_ACLFLAGS)
362 lracl->lr_acl_flags = (uint64_t)vsecp->vsa_aclflags;
364 lracl->lr_acl_flags = 0;
366 bcopy(vsecp->vsa_aclentp, end, aclsize);
367 end = (caddr_t)end + ZIL_ACE_LENGTH(aclsize);
370 /* drop in FUID info */
372 end = zfs_log_fuid_ids(fuidp, end);
373 end = zfs_log_fuid_domains(fuidp, end);
376 * Now place file name in log record
378 bcopy(name, end, namesize);
380 zil_itx_assign(zilog, itx, tx);
384 * Handles both TX_REMOVE and TX_RMDIR transactions.
387 zfs_log_remove(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
388 znode_t *dzp, char *name, uint64_t foid)
392 size_t namesize = strlen(name) + 1;
394 if (zil_replaying(zilog, tx) || zfs_xattr_owner_unlinked(dzp))
397 itx = zil_itx_create(txtype, sizeof (*lr) + namesize);
398 lr = (lr_remove_t *)&itx->itx_lr;
399 lr->lr_doid = dzp->z_id;
400 bcopy(name, (char *)(lr + 1), namesize);
404 zil_itx_assign(zilog, itx, tx);
408 * Handles TX_LINK transactions.
411 zfs_log_link(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
412 znode_t *dzp, znode_t *zp, char *name)
416 size_t namesize = strlen(name) + 1;
418 if (zil_replaying(zilog, tx))
421 itx = zil_itx_create(txtype, sizeof (*lr) + namesize);
422 lr = (lr_link_t *)&itx->itx_lr;
423 lr->lr_doid = dzp->z_id;
424 lr->lr_link_obj = zp->z_id;
425 bcopy(name, (char *)(lr + 1), namesize);
427 zil_itx_assign(zilog, itx, tx);
431 * Handles TX_SYMLINK transactions.
434 zfs_log_symlink(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
435 znode_t *dzp, znode_t *zp, char *name, char *link)
439 size_t namesize = strlen(name) + 1;
440 size_t linksize = strlen(link) + 1;
442 if (zil_replaying(zilog, tx))
445 itx = zil_itx_create(txtype, sizeof (*lr) + namesize + linksize);
446 lr = (lr_create_t *)&itx->itx_lr;
447 lr->lr_doid = dzp->z_id;
448 lr->lr_foid = zp->z_id;
449 lr->lr_uid = KUID_TO_SUID(ZTOI(zp)->i_uid);
450 lr->lr_gid = KGID_TO_SGID(ZTOI(zp)->i_gid);
451 lr->lr_mode = zp->z_mode;
452 (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(ZTOZSB(zp)), &lr->lr_gen,
454 (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_CRTIME(ZTOZSB(zp)),
455 lr->lr_crtime, sizeof (uint64_t) * 2);
456 bcopy(name, (char *)(lr + 1), namesize);
457 bcopy(link, (char *)(lr + 1) + namesize, linksize);
459 zil_itx_assign(zilog, itx, tx);
463 * Handles TX_RENAME transactions.
466 zfs_log_rename(zilog_t *zilog, dmu_tx_t *tx, uint64_t txtype,
467 znode_t *sdzp, char *sname, znode_t *tdzp, char *dname, znode_t *szp)
471 size_t snamesize = strlen(sname) + 1;
472 size_t dnamesize = strlen(dname) + 1;
474 if (zil_replaying(zilog, tx))
477 itx = zil_itx_create(txtype, sizeof (*lr) + snamesize + dnamesize);
478 lr = (lr_rename_t *)&itx->itx_lr;
479 lr->lr_sdoid = sdzp->z_id;
480 lr->lr_tdoid = tdzp->z_id;
481 bcopy(sname, (char *)(lr + 1), snamesize);
482 bcopy(dname, (char *)(lr + 1) + snamesize, dnamesize);
483 itx->itx_oid = szp->z_id;
485 zil_itx_assign(zilog, itx, tx);
489 * zfs_log_write() handles TX_WRITE transactions. The specified callback is
490 * called as soon as the write is on stable storage (be it via a DMU sync or a
493 long zfs_immediate_write_sz = 32768;
496 zfs_log_write(zilog_t *zilog, dmu_tx_t *tx, int txtype,
497 znode_t *zp, offset_t off, ssize_t resid, int ioflag,
498 zil_callback_t callback, void *callback_data)
500 uint32_t blocksize = zp->z_blksz;
501 itx_wr_state_t write_state;
504 if (zil_replaying(zilog, tx) || zp->z_unlinked ||
505 zfs_xattr_owner_unlinked(zp)) {
506 if (callback != NULL)
507 callback(callback_data);
511 if (zilog->zl_logbias == ZFS_LOGBIAS_THROUGHPUT)
512 write_state = WR_INDIRECT;
513 else if (!spa_has_slogs(zilog->zl_spa) &&
514 resid >= zfs_immediate_write_sz)
515 write_state = WR_INDIRECT;
516 else if (ioflag & (FSYNC | FDSYNC))
517 write_state = WR_COPIED;
519 write_state = WR_NEED_COPY;
521 if ((fsync_cnt = (uintptr_t)tsd_get(zfs_fsyncer_key)) != 0) {
522 (void) tsd_set(zfs_fsyncer_key, (void *)(fsync_cnt - 1));
528 itx_wr_state_t wr_state = write_state;
531 if (wr_state == WR_COPIED && resid > ZIL_MAX_COPIED_DATA)
532 wr_state = WR_NEED_COPY;
533 else if (wr_state == WR_INDIRECT)
534 len = MIN(blocksize - P2PHASE(off, blocksize), resid);
536 itx = zil_itx_create(txtype, sizeof (*lr) +
537 (wr_state == WR_COPIED ? len : 0));
538 lr = (lr_write_t *)&itx->itx_lr;
539 if (wr_state == WR_COPIED && dmu_read(ZTOZSB(zp)->z_os,
540 zp->z_id, off, len, lr + 1, DMU_READ_NO_PREFETCH) != 0) {
541 zil_itx_destroy(itx);
542 itx = zil_itx_create(txtype, sizeof (*lr));
543 lr = (lr_write_t *)&itx->itx_lr;
544 wr_state = WR_NEED_COPY;
547 itx->itx_wr_state = wr_state;
548 lr->lr_foid = zp->z_id;
552 BP_ZERO(&lr->lr_blkptr);
554 itx->itx_private = ZTOZSB(zp);
556 if (!(ioflag & (FSYNC | FDSYNC)) && (zp->z_sync_cnt == 0) &&
558 itx->itx_sync = B_FALSE;
560 itx->itx_callback = callback;
561 itx->itx_callback_data = callback_data;
562 zil_itx_assign(zilog, itx, tx);
570 * Handles TX_TRUNCATE transactions.
573 zfs_log_truncate(zilog_t *zilog, dmu_tx_t *tx, int txtype,
574 znode_t *zp, uint64_t off, uint64_t len)
579 if (zil_replaying(zilog, tx) || zp->z_unlinked ||
580 zfs_xattr_owner_unlinked(zp))
583 itx = zil_itx_create(txtype, sizeof (*lr));
584 lr = (lr_truncate_t *)&itx->itx_lr;
585 lr->lr_foid = zp->z_id;
589 itx->itx_sync = (zp->z_sync_cnt != 0);
590 zil_itx_assign(zilog, itx, tx);
594 * Handles TX_SETATTR transactions.
597 zfs_log_setattr(zilog_t *zilog, dmu_tx_t *tx, int txtype,
598 znode_t *zp, vattr_t *vap, uint_t mask_applied, zfs_fuid_info_t *fuidp)
602 xvattr_t *xvap = (xvattr_t *)vap;
603 size_t recsize = sizeof (lr_setattr_t);
606 if (zil_replaying(zilog, tx) || zp->z_unlinked)
610 * If XVATTR set, then log record size needs to allow
611 * for lr_attr_t + xvattr mask, mapsize and create time
612 * plus actual attribute values
614 if (vap->va_mask & ATTR_XVATTR)
615 recsize = sizeof (*lr) + ZIL_XVAT_SIZE(xvap->xva_mapsize);
618 recsize += fuidp->z_domain_str_sz;
620 itx = zil_itx_create(txtype, recsize);
621 lr = (lr_setattr_t *)&itx->itx_lr;
622 lr->lr_foid = zp->z_id;
623 lr->lr_mask = (uint64_t)mask_applied;
624 lr->lr_mode = (uint64_t)vap->va_mode;
625 if ((mask_applied & ATTR_UID) && IS_EPHEMERAL(vap->va_uid))
626 lr->lr_uid = fuidp->z_fuid_owner;
628 lr->lr_uid = (uint64_t)vap->va_uid;
630 if ((mask_applied & ATTR_GID) && IS_EPHEMERAL(vap->va_gid))
631 lr->lr_gid = fuidp->z_fuid_group;
633 lr->lr_gid = (uint64_t)vap->va_gid;
635 lr->lr_size = (uint64_t)vap->va_size;
636 ZFS_TIME_ENCODE(&vap->va_atime, lr->lr_atime);
637 ZFS_TIME_ENCODE(&vap->va_mtime, lr->lr_mtime);
638 start = (lr_setattr_t *)(lr + 1);
639 if (vap->va_mask & ATTR_XVATTR) {
640 zfs_log_xvattr((lr_attr_t *)start, xvap);
641 start = (caddr_t)start + ZIL_XVAT_SIZE(xvap->xva_mapsize);
645 * Now stick on domain information if any on end
649 (void) zfs_log_fuid_domains(fuidp, start);
651 itx->itx_sync = (zp->z_sync_cnt != 0);
652 zil_itx_assign(zilog, itx, tx);
656 * Handles TX_ACL transactions.
659 zfs_log_acl(zilog_t *zilog, dmu_tx_t *tx, znode_t *zp,
660 vsecattr_t *vsecp, zfs_fuid_info_t *fuidp)
668 size_t aclbytes = vsecp->vsa_aclentsz;
670 if (zil_replaying(zilog, tx) || zp->z_unlinked)
673 txtype = (ZTOZSB(zp)->z_version < ZPL_VERSION_FUID) ?
676 if (txtype == TX_ACL)
677 lrsize = sizeof (*lr);
679 lrsize = sizeof (*lrv0);
682 ((txtype == TX_ACL) ? ZIL_ACE_LENGTH(aclbytes) : aclbytes) +
683 (fuidp ? fuidp->z_domain_str_sz : 0) +
684 sizeof (uint64_t) * (fuidp ? fuidp->z_fuid_cnt : 0);
686 itx = zil_itx_create(txtype, txsize);
688 lr = (lr_acl_t *)&itx->itx_lr;
689 lr->lr_foid = zp->z_id;
690 if (txtype == TX_ACL) {
691 lr->lr_acl_bytes = aclbytes;
692 lr->lr_domcnt = fuidp ? fuidp->z_domain_cnt : 0;
693 lr->lr_fuidcnt = fuidp ? fuidp->z_fuid_cnt : 0;
694 if (vsecp->vsa_mask & VSA_ACE_ACLFLAGS)
695 lr->lr_acl_flags = (uint64_t)vsecp->vsa_aclflags;
697 lr->lr_acl_flags = 0;
699 lr->lr_aclcnt = (uint64_t)vsecp->vsa_aclcnt;
701 if (txtype == TX_ACL_V0) {
702 lrv0 = (lr_acl_v0_t *)lr;
703 bcopy(vsecp->vsa_aclentp, (ace_t *)(lrv0 + 1), aclbytes);
705 void *start = (ace_t *)(lr + 1);
707 bcopy(vsecp->vsa_aclentp, start, aclbytes);
709 start = (caddr_t)start + ZIL_ACE_LENGTH(aclbytes);
712 start = zfs_log_fuid_ids(fuidp, start);
713 (void) zfs_log_fuid_domains(fuidp, start);
717 itx->itx_sync = (zp->z_sync_cnt != 0);
718 zil_itx_assign(zilog, itx, tx);
722 module_param(zfs_immediate_write_sz, long, 0644);
723 MODULE_PARM_DESC(zfs_immediate_write_sz, "Largest data block to write to zil");