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.
26 #include <sys/types.h>
27 #include <sys/param.h>
28 #include <sys/systm.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>
48 #include <sys/dsl_dataset.h>
51 * These zfs_log_* functions must be called within a dmu tx, in one
52 * of 2 contexts depending on zilog->z_replay:
56 * We need to record the transaction so that if it is committed to
57 * the Intent Log then it can be replayed. An intent log transaction
58 * structure (itx_t) is allocated and all the information necessary to
59 * possibly replay the transaction is saved in it. The itx is then assigned
60 * a sequence number and inserted in the in-memory list anchored in the zilog.
64 * We need to mark the intent log record as replayed in the log header.
65 * This is done in the same transaction as the replay so that they
70 zfs_log_create_txtype(zil_create_t type
, vsecattr_t
*vsecp
, vattr_t
*vap
)
72 int isxvattr
= (vap
->va_mask
& ATTR_XVATTR
);
75 if (vsecp
== NULL
&& !isxvattr
)
77 if (vsecp
&& isxvattr
)
78 return (TX_CREATE_ACL_ATTR
);
80 return (TX_CREATE_ACL
);
82 return (TX_CREATE_ATTR
);
85 if (vsecp
== NULL
&& !isxvattr
)
87 if (vsecp
&& isxvattr
)
88 return (TX_MKDIR_ACL_ATTR
);
90 return (TX_MKDIR_ACL
);
92 return (TX_MKDIR_ATTR
);
101 * build up the log data necessary for logging xvattr_t
102 * First lr_attr_t is initialized. following the lr_attr_t
103 * is the mapsize and attribute bitmap copied from the xvattr_t.
104 * Following the bitmap and bitmapsize two 64 bit words are reserved
105 * for the create time which may be set. Following the create time
106 * records a single 64 bit integer which has the bits to set on
107 * replay for the xvattr.
110 zfs_log_xvattr(lr_attr_t
*lrattr
, xvattr_t
*xvap
)
119 xoap
= xva_getxoptattr(xvap
);
122 lrattr
->lr_attr_masksize
= xvap
->xva_mapsize
;
123 bitmap
= &lrattr
->lr_attr_bitmap
;
124 for (i
= 0; i
!= xvap
->xva_mapsize
; i
++, bitmap
++) {
125 *bitmap
= xvap
->xva_reqattrmap
[i
];
128 /* Now pack the attributes up in a single uint64_t */
129 attrs
= (uint64_t *)bitmap
;
131 scanstamp
= (caddr_t
)(crtime
+ 2);
133 if (XVA_ISSET_REQ(xvap
, XAT_READONLY
))
134 *attrs
|= (xoap
->xoa_readonly
== 0) ? 0 :
136 if (XVA_ISSET_REQ(xvap
, XAT_HIDDEN
))
137 *attrs
|= (xoap
->xoa_hidden
== 0) ? 0 :
139 if (XVA_ISSET_REQ(xvap
, XAT_SYSTEM
))
140 *attrs
|= (xoap
->xoa_system
== 0) ? 0 :
142 if (XVA_ISSET_REQ(xvap
, XAT_ARCHIVE
))
143 *attrs
|= (xoap
->xoa_archive
== 0) ? 0 :
145 if (XVA_ISSET_REQ(xvap
, XAT_IMMUTABLE
))
146 *attrs
|= (xoap
->xoa_immutable
== 0) ? 0 :
148 if (XVA_ISSET_REQ(xvap
, XAT_NOUNLINK
))
149 *attrs
|= (xoap
->xoa_nounlink
== 0) ? 0 :
151 if (XVA_ISSET_REQ(xvap
, XAT_APPENDONLY
))
152 *attrs
|= (xoap
->xoa_appendonly
== 0) ? 0 :
154 if (XVA_ISSET_REQ(xvap
, XAT_OPAQUE
))
155 *attrs
|= (xoap
->xoa_opaque
== 0) ? 0 :
157 if (XVA_ISSET_REQ(xvap
, XAT_NODUMP
))
158 *attrs
|= (xoap
->xoa_nodump
== 0) ? 0 :
160 if (XVA_ISSET_REQ(xvap
, XAT_AV_QUARANTINED
))
161 *attrs
|= (xoap
->xoa_av_quarantined
== 0) ? 0 :
163 if (XVA_ISSET_REQ(xvap
, XAT_AV_MODIFIED
))
164 *attrs
|= (xoap
->xoa_av_modified
== 0) ? 0 :
166 if (XVA_ISSET_REQ(xvap
, XAT_CREATETIME
))
167 ZFS_TIME_ENCODE(&xoap
->xoa_createtime
, crtime
);
168 if (XVA_ISSET_REQ(xvap
, XAT_AV_SCANSTAMP
))
169 bcopy(xoap
->xoa_av_scanstamp
, scanstamp
, AV_SCANSTAMP_SZ
);
170 if (XVA_ISSET_REQ(xvap
, XAT_REPARSE
))
171 *attrs
|= (xoap
->xoa_reparse
== 0) ? 0 :
173 if (XVA_ISSET_REQ(xvap
, XAT_OFFLINE
))
174 *attrs
|= (xoap
->xoa_offline
== 0) ? 0 :
176 if (XVA_ISSET_REQ(xvap
, XAT_SPARSE
))
177 *attrs
|= (xoap
->xoa_sparse
== 0) ? 0 :
182 zfs_log_fuid_ids(zfs_fuid_info_t
*fuidp
, void *start
)
185 uint64_t *fuidloc
= start
;
187 /* First copy in the ACE FUIDs */
188 for (zfuid
= list_head(&fuidp
->z_fuids
); zfuid
;
189 zfuid
= list_next(&fuidp
->z_fuids
, zfuid
)) {
190 *fuidloc
++ = zfuid
->z_logfuid
;
197 zfs_log_fuid_domains(zfs_fuid_info_t
*fuidp
, void *start
)
199 zfs_fuid_domain_t
*zdomain
;
201 /* now copy in the domain info, if any */
202 if (fuidp
->z_domain_str_sz
!= 0) {
203 for (zdomain
= list_head(&fuidp
->z_domains
); zdomain
;
204 zdomain
= list_next(&fuidp
->z_domains
, zdomain
)) {
205 bcopy((void *)zdomain
->z_domain
, start
,
206 strlen(zdomain
->z_domain
) + 1);
207 start
= (caddr_t
)start
+
208 strlen(zdomain
->z_domain
) + 1;
215 * Handles TX_CREATE, TX_CREATE_ATTR, TX_MKDIR, TX_MKDIR_ATTR and
216 * TK_MKXATTR transactions.
218 * TX_CREATE and TX_MKDIR are standard creates, but they may have FUID
219 * domain information appended prior to the name. In this case the
220 * uid/gid in the log record will be a log centric FUID.
222 * TX_CREATE_ACL_ATTR and TX_MKDIR_ACL_ATTR handle special creates that
223 * may contain attributes, ACL and optional fuid information.
225 * TX_CREATE_ACL and TX_MKDIR_ACL handle special creates that specify
226 * and ACL and normal users/groups in the ACEs.
228 * There may be an optional xvattr attribute information similar
229 * to zfs_log_setattr.
231 * Also, after the file name "domain" strings may be appended.
234 zfs_log_create(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
235 znode_t
*dzp
, znode_t
*zp
, char *name
, vsecattr_t
*vsecp
,
236 zfs_fuid_info_t
*fuidp
, vattr_t
*vap
)
240 lr_acl_create_t
*lracl
;
244 xvattr_t
*xvap
= (xvattr_t
*)vap
;
247 size_t namesize
= strlen(name
) + 1;
250 if (zil_replaying(zilog
, tx
))
254 * If we have FUIDs present then add in space for
255 * domains and ACE fuid's if any.
258 fuidsz
+= fuidp
->z_domain_str_sz
;
259 fuidsz
+= fuidp
->z_fuid_cnt
* sizeof (uint64_t);
262 if (vap
->va_mask
& ATTR_XVATTR
)
263 xvatsize
= ZIL_XVAT_SIZE(xvap
->xva_mapsize
);
265 if ((int)txtype
== TX_CREATE_ATTR
|| (int)txtype
== TX_MKDIR_ATTR
||
266 (int)txtype
== TX_CREATE
|| (int)txtype
== TX_MKDIR
||
267 (int)txtype
== TX_MKXATTR
) {
268 txsize
= sizeof (*lr
) + namesize
+ fuidsz
+ xvatsize
;
269 lrsize
= sizeof (*lr
);
272 sizeof (lr_acl_create_t
) + namesize
+ fuidsz
+
273 ZIL_ACE_LENGTH(aclsize
) + xvatsize
;
274 lrsize
= sizeof (lr_acl_create_t
);
277 itx
= zil_itx_create(txtype
, txsize
);
279 lr
= (lr_create_t
*)&itx
->itx_lr
;
280 lr
->lr_doid
= dzp
->z_id
;
281 lr
->lr_foid
= zp
->z_id
;
282 lr
->lr_mode
= zp
->z_mode
;
283 if (!IS_EPHEMERAL(zp
->z_uid
)) {
284 lr
->lr_uid
= (uint64_t)zp
->z_uid
;
286 lr
->lr_uid
= fuidp
->z_fuid_owner
;
288 if (!IS_EPHEMERAL(zp
->z_gid
)) {
289 lr
->lr_gid
= (uint64_t)zp
->z_gid
;
291 lr
->lr_gid
= fuidp
->z_fuid_group
;
293 (void) sa_lookup(zp
->z_sa_hdl
, SA_ZPL_GEN(ZTOZSB(zp
)), &lr
->lr_gen
,
295 (void) sa_lookup(zp
->z_sa_hdl
, SA_ZPL_CRTIME(ZTOZSB(zp
)),
296 lr
->lr_crtime
, sizeof (uint64_t) * 2);
298 if (sa_lookup(zp
->z_sa_hdl
, SA_ZPL_RDEV(ZTOZSB(zp
)), &lr
->lr_rdev
,
299 sizeof (lr
->lr_rdev
)) != 0)
303 * Fill in xvattr info if any
305 if (vap
->va_mask
& ATTR_XVATTR
) {
306 zfs_log_xvattr((lr_attr_t
*)((caddr_t
)lr
+ lrsize
), xvap
);
307 end
= (caddr_t
)lr
+ lrsize
+ xvatsize
;
309 end
= (caddr_t
)lr
+ lrsize
;
312 /* Now fill in any ACL info */
315 lracl
= (lr_acl_create_t
*)&itx
->itx_lr
;
316 lracl
->lr_aclcnt
= vsecp
->vsa_aclcnt
;
317 lracl
->lr_acl_bytes
= aclsize
;
318 lracl
->lr_domcnt
= fuidp
? fuidp
->z_domain_cnt
: 0;
319 lracl
->lr_fuidcnt
= fuidp
? fuidp
->z_fuid_cnt
: 0;
320 if (vsecp
->vsa_aclflags
& VSA_ACE_ACLFLAGS
)
321 lracl
->lr_acl_flags
= (uint64_t)vsecp
->vsa_aclflags
;
323 lracl
->lr_acl_flags
= 0;
325 bcopy(vsecp
->vsa_aclentp
, end
, aclsize
);
326 end
= (caddr_t
)end
+ ZIL_ACE_LENGTH(aclsize
);
329 /* drop in FUID info */
331 end
= zfs_log_fuid_ids(fuidp
, end
);
332 end
= zfs_log_fuid_domains(fuidp
, end
);
335 * Now place file name in log record
337 bcopy(name
, end
, namesize
);
339 zil_itx_assign(zilog
, itx
, tx
);
343 * Handles both TX_REMOVE and TX_RMDIR transactions.
346 zfs_log_remove(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
347 znode_t
*dzp
, char *name
, uint64_t foid
)
351 size_t namesize
= strlen(name
) + 1;
353 if (zil_replaying(zilog
, tx
))
356 itx
= zil_itx_create(txtype
, sizeof (*lr
) + namesize
);
357 lr
= (lr_remove_t
*)&itx
->itx_lr
;
358 lr
->lr_doid
= dzp
->z_id
;
359 bcopy(name
, (char *)(lr
+ 1), namesize
);
363 zil_itx_assign(zilog
, itx
, tx
);
367 * Handles TX_LINK transactions.
370 zfs_log_link(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
371 znode_t
*dzp
, znode_t
*zp
, char *name
)
375 size_t namesize
= strlen(name
) + 1;
377 if (zil_replaying(zilog
, tx
))
380 itx
= zil_itx_create(txtype
, sizeof (*lr
) + namesize
);
381 lr
= (lr_link_t
*)&itx
->itx_lr
;
382 lr
->lr_doid
= dzp
->z_id
;
383 lr
->lr_link_obj
= zp
->z_id
;
384 bcopy(name
, (char *)(lr
+ 1), namesize
);
386 zil_itx_assign(zilog
, itx
, tx
);
390 * Handles TX_SYMLINK transactions.
393 zfs_log_symlink(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
394 znode_t
*dzp
, znode_t
*zp
, char *name
, char *link
)
398 size_t namesize
= strlen(name
) + 1;
399 size_t linksize
= strlen(link
) + 1;
401 if (zil_replaying(zilog
, tx
))
404 itx
= zil_itx_create(txtype
, sizeof (*lr
) + namesize
+ linksize
);
405 lr
= (lr_create_t
*)&itx
->itx_lr
;
406 lr
->lr_doid
= dzp
->z_id
;
407 lr
->lr_foid
= zp
->z_id
;
408 lr
->lr_uid
= zp
->z_uid
;
409 lr
->lr_gid
= zp
->z_gid
;
410 lr
->lr_mode
= zp
->z_mode
;
411 (void) sa_lookup(zp
->z_sa_hdl
, SA_ZPL_GEN(ZTOZSB(zp
)), &lr
->lr_gen
,
413 (void) sa_lookup(zp
->z_sa_hdl
, SA_ZPL_CRTIME(ZTOZSB(zp
)),
414 lr
->lr_crtime
, sizeof (uint64_t) * 2);
415 bcopy(name
, (char *)(lr
+ 1), namesize
);
416 bcopy(link
, (char *)(lr
+ 1) + namesize
, linksize
);
418 zil_itx_assign(zilog
, itx
, tx
);
422 * Handles TX_RENAME transactions.
425 zfs_log_rename(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
426 znode_t
*sdzp
, char *sname
, znode_t
*tdzp
, char *dname
, znode_t
*szp
)
430 size_t snamesize
= strlen(sname
) + 1;
431 size_t dnamesize
= strlen(dname
) + 1;
433 if (zil_replaying(zilog
, tx
))
436 itx
= zil_itx_create(txtype
, sizeof (*lr
) + snamesize
+ dnamesize
);
437 lr
= (lr_rename_t
*)&itx
->itx_lr
;
438 lr
->lr_sdoid
= sdzp
->z_id
;
439 lr
->lr_tdoid
= tdzp
->z_id
;
440 bcopy(sname
, (char *)(lr
+ 1), snamesize
);
441 bcopy(dname
, (char *)(lr
+ 1) + snamesize
, dnamesize
);
442 itx
->itx_oid
= szp
->z_id
;
444 zil_itx_assign(zilog
, itx
, tx
);
448 * zfs_log_write() handles TX_WRITE transactions. The specified callback is
449 * called as soon as the write is on stable storage (be it via a DMU sync or a
452 long zfs_immediate_write_sz
= 32768;
455 zfs_log_write(zilog_t
*zilog
, dmu_tx_t
*tx
, int txtype
,
456 znode_t
*zp
, offset_t off
, ssize_t resid
, int ioflag
,
457 zil_callback_t callback
, void *callback_data
)
459 itx_wr_state_t write_state
;
462 ssize_t immediate_write_sz
;
464 if (zil_replaying(zilog
, tx
) || zp
->z_unlinked
) {
465 if (callback
!= NULL
)
466 callback(callback_data
);
470 immediate_write_sz
= (zilog
->zl_logbias
== ZFS_LOGBIAS_THROUGHPUT
)
471 ? 0 : (ssize_t
)zfs_immediate_write_sz
;
473 slogging
= spa_has_slogs(zilog
->zl_spa
) &&
474 (zilog
->zl_logbias
== ZFS_LOGBIAS_LATENCY
);
475 if (resid
> immediate_write_sz
&& !slogging
&& resid
<= zp
->z_blksz
)
476 write_state
= WR_INDIRECT
;
477 else if (ioflag
& (FSYNC
| FDSYNC
))
478 write_state
= WR_COPIED
;
480 write_state
= WR_NEED_COPY
;
482 if ((fsync_cnt
= (uintptr_t)tsd_get(zfs_fsyncer_key
)) != 0) {
483 (void) tsd_set(zfs_fsyncer_key
, (void *)(fsync_cnt
- 1));
492 * If the write would overflow the largest block then split it.
494 if (write_state
!= WR_INDIRECT
&& resid
> ZIL_MAX_LOG_DATA
)
495 len
= SPA_OLD_MAXBLOCKSIZE
>> 1;
499 itx
= zil_itx_create(txtype
, sizeof (*lr
) +
500 (write_state
== WR_COPIED
? len
: 0));
501 lr
= (lr_write_t
*)&itx
->itx_lr
;
502 if (write_state
== WR_COPIED
&& dmu_read(ZTOZSB(zp
)->z_os
,
503 zp
->z_id
, off
, len
, lr
+ 1, DMU_READ_NO_PREFETCH
) != 0) {
504 zil_itx_destroy(itx
);
505 itx
= zil_itx_create(txtype
, sizeof (*lr
));
506 lr
= (lr_write_t
*)&itx
->itx_lr
;
507 write_state
= WR_NEED_COPY
;
510 itx
->itx_wr_state
= write_state
;
511 if (write_state
== WR_NEED_COPY
)
513 lr
->lr_foid
= zp
->z_id
;
517 BP_ZERO(&lr
->lr_blkptr
);
519 itx
->itx_private
= ZTOZSB(zp
);
521 if (!(ioflag
& (FSYNC
| FDSYNC
)) && (zp
->z_sync_cnt
== 0) &&
523 itx
->itx_sync
= B_FALSE
;
525 itx
->itx_callback
= callback
;
526 itx
->itx_callback_data
= callback_data
;
527 zil_itx_assign(zilog
, itx
, tx
);
535 * Handles TX_TRUNCATE transactions.
538 zfs_log_truncate(zilog_t
*zilog
, dmu_tx_t
*tx
, int txtype
,
539 znode_t
*zp
, uint64_t off
, uint64_t len
)
544 if (zil_replaying(zilog
, tx
) || zp
->z_unlinked
)
547 itx
= zil_itx_create(txtype
, sizeof (*lr
));
548 lr
= (lr_truncate_t
*)&itx
->itx_lr
;
549 lr
->lr_foid
= zp
->z_id
;
553 itx
->itx_sync
= (zp
->z_sync_cnt
!= 0);
554 zil_itx_assign(zilog
, itx
, tx
);
558 * Handles TX_SETATTR transactions.
561 zfs_log_setattr(zilog_t
*zilog
, dmu_tx_t
*tx
, int txtype
,
562 znode_t
*zp
, vattr_t
*vap
, uint_t mask_applied
, zfs_fuid_info_t
*fuidp
)
566 xvattr_t
*xvap
= (xvattr_t
*)vap
;
567 size_t recsize
= sizeof (lr_setattr_t
);
570 if (zil_replaying(zilog
, tx
) || zp
->z_unlinked
)
574 * If XVATTR set, then log record size needs to allow
575 * for lr_attr_t + xvattr mask, mapsize and create time
576 * plus actual attribute values
578 if (vap
->va_mask
& ATTR_XVATTR
)
579 recsize
= sizeof (*lr
) + ZIL_XVAT_SIZE(xvap
->xva_mapsize
);
582 recsize
+= fuidp
->z_domain_str_sz
;
584 itx
= zil_itx_create(txtype
, recsize
);
585 lr
= (lr_setattr_t
*)&itx
->itx_lr
;
586 lr
->lr_foid
= zp
->z_id
;
587 lr
->lr_mask
= (uint64_t)mask_applied
;
588 lr
->lr_mode
= (uint64_t)vap
->va_mode
;
589 if ((mask_applied
& ATTR_UID
) && IS_EPHEMERAL(vap
->va_uid
))
590 lr
->lr_uid
= fuidp
->z_fuid_owner
;
592 lr
->lr_uid
= (uint64_t)vap
->va_uid
;
594 if ((mask_applied
& ATTR_GID
) && IS_EPHEMERAL(vap
->va_gid
))
595 lr
->lr_gid
= fuidp
->z_fuid_group
;
597 lr
->lr_gid
= (uint64_t)vap
->va_gid
;
599 lr
->lr_size
= (uint64_t)vap
->va_size
;
600 ZFS_TIME_ENCODE(&vap
->va_atime
, lr
->lr_atime
);
601 ZFS_TIME_ENCODE(&vap
->va_mtime
, lr
->lr_mtime
);
602 start
= (lr_setattr_t
*)(lr
+ 1);
603 if (vap
->va_mask
& ATTR_XVATTR
) {
604 zfs_log_xvattr((lr_attr_t
*)start
, xvap
);
605 start
= (caddr_t
)start
+ ZIL_XVAT_SIZE(xvap
->xva_mapsize
);
609 * Now stick on domain information if any on end
613 (void) zfs_log_fuid_domains(fuidp
, start
);
615 itx
->itx_sync
= (zp
->z_sync_cnt
!= 0);
616 zil_itx_assign(zilog
, itx
, tx
);
620 * Handles TX_ACL transactions.
623 zfs_log_acl(zilog_t
*zilog
, dmu_tx_t
*tx
, znode_t
*zp
,
624 vsecattr_t
*vsecp
, zfs_fuid_info_t
*fuidp
)
632 size_t aclbytes
= vsecp
->vsa_aclentsz
;
634 if (zil_replaying(zilog
, tx
) || zp
->z_unlinked
)
637 txtype
= (ZTOZSB(zp
)->z_version
< ZPL_VERSION_FUID
) ?
640 if (txtype
== TX_ACL
)
641 lrsize
= sizeof (*lr
);
643 lrsize
= sizeof (*lrv0
);
646 ((txtype
== TX_ACL
) ? ZIL_ACE_LENGTH(aclbytes
) : aclbytes
) +
647 (fuidp
? fuidp
->z_domain_str_sz
: 0) +
648 sizeof (uint64_t) * (fuidp
? fuidp
->z_fuid_cnt
: 0);
650 itx
= zil_itx_create(txtype
, txsize
);
652 lr
= (lr_acl_t
*)&itx
->itx_lr
;
653 lr
->lr_foid
= zp
->z_id
;
654 if (txtype
== TX_ACL
) {
655 lr
->lr_acl_bytes
= aclbytes
;
656 lr
->lr_domcnt
= fuidp
? fuidp
->z_domain_cnt
: 0;
657 lr
->lr_fuidcnt
= fuidp
? fuidp
->z_fuid_cnt
: 0;
658 if (vsecp
->vsa_mask
& VSA_ACE_ACLFLAGS
)
659 lr
->lr_acl_flags
= (uint64_t)vsecp
->vsa_aclflags
;
661 lr
->lr_acl_flags
= 0;
663 lr
->lr_aclcnt
= (uint64_t)vsecp
->vsa_aclcnt
;
665 if (txtype
== TX_ACL_V0
) {
666 lrv0
= (lr_acl_v0_t
*)lr
;
667 bcopy(vsecp
->vsa_aclentp
, (ace_t
*)(lrv0
+ 1), aclbytes
);
669 void *start
= (ace_t
*)(lr
+ 1);
671 bcopy(vsecp
->vsa_aclentp
, start
, aclbytes
);
673 start
= (caddr_t
)start
+ ZIL_ACE_LENGTH(aclbytes
);
676 start
= zfs_log_fuid_ids(fuidp
, start
);
677 (void) zfs_log_fuid_domains(fuidp
, start
);
681 itx
->itx_sync
= (zp
->z_sync_cnt
!= 0);
682 zil_itx_assign(zilog
, itx
, tx
);
685 #if defined(_KERNEL) && defined(HAVE_SPL)
686 module_param(zfs_immediate_write_sz
, long, 0644);
687 MODULE_PARM_DESC(zfs_immediate_write_sz
, "Largest data block to write to zil");