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 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
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>
50 * All the functions in this file are used to construct the log entries
51 * to record transactions. They allocate * an intent log transaction
52 * structure (itx_t) and save within it all the information necessary to
53 * possibly replay the transaction. The itx is then assigned a sequence
54 * number and inserted in the in-memory list anchored in the zilog.
58 zfs_log_create_txtype(zil_create_t type
, vsecattr_t
*vsecp
, vattr_t
*vap
)
60 int isxvattr
= (vap
->va_mask
& AT_XVATTR
);
63 if (vsecp
== NULL
&& !isxvattr
)
65 if (vsecp
&& isxvattr
)
66 return (TX_CREATE_ACL_ATTR
);
68 return (TX_CREATE_ACL
);
70 return (TX_CREATE_ATTR
);
73 if (vsecp
== NULL
&& !isxvattr
)
75 if (vsecp
&& isxvattr
)
76 return (TX_MKDIR_ACL_ATTR
);
78 return (TX_MKDIR_ACL
);
80 return (TX_MKDIR_ATTR
);
89 * build up the log data necessary for logging xvattr_t
90 * First lr_attr_t is initialized. following the lr_attr_t
91 * is the mapsize and attribute bitmap copied from the xvattr_t.
92 * Following the bitmap and bitmapsize two 64 bit words are reserved
93 * for the create time which may be set. Following the create time
94 * records a single 64 bit integer which has the bits to set on
95 * replay for the xvattr.
98 zfs_log_xvattr(lr_attr_t
*lrattr
, xvattr_t
*xvap
)
107 xoap
= xva_getxoptattr(xvap
);
110 lrattr
->lr_attr_masksize
= xvap
->xva_mapsize
;
111 bitmap
= &lrattr
->lr_attr_bitmap
;
112 for (i
= 0; i
!= xvap
->xva_mapsize
; i
++, bitmap
++) {
113 *bitmap
= xvap
->xva_reqattrmap
[i
];
116 /* Now pack the attributes up in a single uint64_t */
117 attrs
= (uint64_t *)bitmap
;
119 scanstamp
= (caddr_t
)(crtime
+ 2);
121 if (XVA_ISSET_REQ(xvap
, XAT_READONLY
))
122 *attrs
|= (xoap
->xoa_readonly
== 0) ? 0 :
124 if (XVA_ISSET_REQ(xvap
, XAT_HIDDEN
))
125 *attrs
|= (xoap
->xoa_hidden
== 0) ? 0 :
127 if (XVA_ISSET_REQ(xvap
, XAT_SYSTEM
))
128 *attrs
|= (xoap
->xoa_system
== 0) ? 0 :
130 if (XVA_ISSET_REQ(xvap
, XAT_ARCHIVE
))
131 *attrs
|= (xoap
->xoa_archive
== 0) ? 0 :
133 if (XVA_ISSET_REQ(xvap
, XAT_IMMUTABLE
))
134 *attrs
|= (xoap
->xoa_immutable
== 0) ? 0 :
136 if (XVA_ISSET_REQ(xvap
, XAT_NOUNLINK
))
137 *attrs
|= (xoap
->xoa_nounlink
== 0) ? 0 :
139 if (XVA_ISSET_REQ(xvap
, XAT_APPENDONLY
))
140 *attrs
|= (xoap
->xoa_appendonly
== 0) ? 0 :
142 if (XVA_ISSET_REQ(xvap
, XAT_OPAQUE
))
143 *attrs
|= (xoap
->xoa_opaque
== 0) ? 0 :
145 if (XVA_ISSET_REQ(xvap
, XAT_NODUMP
))
146 *attrs
|= (xoap
->xoa_nodump
== 0) ? 0 :
148 if (XVA_ISSET_REQ(xvap
, XAT_AV_QUARANTINED
))
149 *attrs
|= (xoap
->xoa_av_quarantined
== 0) ? 0 :
151 if (XVA_ISSET_REQ(xvap
, XAT_AV_MODIFIED
))
152 *attrs
|= (xoap
->xoa_av_modified
== 0) ? 0 :
154 if (XVA_ISSET_REQ(xvap
, XAT_CREATETIME
))
155 ZFS_TIME_ENCODE(&xoap
->xoa_createtime
, crtime
);
156 if (XVA_ISSET_REQ(xvap
, XAT_AV_SCANSTAMP
))
157 bcopy(xoap
->xoa_av_scanstamp
, scanstamp
, AV_SCANSTAMP_SZ
);
161 zfs_log_fuid_ids(zfs_fuid_info_t
*fuidp
, void *start
)
164 uint64_t *fuidloc
= start
;
166 /* First copy in the ACE FUIDs */
167 for (zfuid
= list_head(&fuidp
->z_fuids
); zfuid
;
168 zfuid
= list_next(&fuidp
->z_fuids
, zfuid
)) {
169 *fuidloc
++ = zfuid
->z_logfuid
;
176 zfs_log_fuid_domains(zfs_fuid_info_t
*fuidp
, void *start
)
178 zfs_fuid_domain_t
*zdomain
;
180 /* now copy in the domain info, if any */
181 if (fuidp
->z_domain_str_sz
!= 0) {
182 for (zdomain
= list_head(&fuidp
->z_domains
); zdomain
;
183 zdomain
= list_next(&fuidp
->z_domains
, zdomain
)) {
184 bcopy((void *)zdomain
->z_domain
, start
,
185 strlen(zdomain
->z_domain
) + 1);
186 start
= (caddr_t
)start
+
187 strlen(zdomain
->z_domain
) + 1;
194 * zfs_log_create() is used to handle TX_CREATE, TX_CREATE_ATTR, TX_MKDIR,
195 * TX_MKDIR_ATTR and TX_MKXATTR
198 * TX_CREATE and TX_MKDIR are standard creates, but they may have FUID
199 * domain information appended prior to the name. In this case the
200 * uid/gid in the log record will be a log centric FUID.
202 * TX_CREATE_ACL_ATTR and TX_MKDIR_ACL_ATTR handle special creates that
203 * may contain attributes, ACL and optional fuid information.
205 * TX_CREATE_ACL and TX_MKDIR_ACL handle special creates that specify
206 * and ACL and normal users/groups in the ACEs.
208 * There may be an optional xvattr attribute information similar
209 * to zfs_log_setattr.
211 * Also, after the file name "domain" strings may be appended.
214 zfs_log_create(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
215 znode_t
*dzp
, znode_t
*zp
, char *name
, vsecattr_t
*vsecp
,
216 zfs_fuid_info_t
*fuidp
, vattr_t
*vap
)
221 lr_acl_create_t
*lracl
;
225 xvattr_t
*xvap
= (xvattr_t
*)vap
;
228 size_t namesize
= strlen(name
) + 1;
235 * If we have FUIDs present then add in space for
236 * domains and ACE fuid's if any.
239 fuidsz
+= fuidp
->z_domain_str_sz
;
240 fuidsz
+= fuidp
->z_fuid_cnt
* sizeof (uint64_t);
243 if (vap
->va_mask
& AT_XVATTR
)
244 xvatsize
= ZIL_XVAT_SIZE(xvap
->xva_mapsize
);
246 if ((int)txtype
== TX_CREATE_ATTR
|| (int)txtype
== TX_MKDIR_ATTR
||
247 (int)txtype
== TX_CREATE
|| (int)txtype
== TX_MKDIR
||
248 (int)txtype
== TX_MKXATTR
) {
249 txsize
= sizeof (*lr
) + namesize
+ fuidsz
+ xvatsize
;
250 lrsize
= sizeof (*lr
);
252 aclsize
= (vsecp
) ? vsecp
->vsa_aclentsz
: 0;
254 sizeof (lr_acl_create_t
) + namesize
+ fuidsz
+
255 ZIL_ACE_LENGTH(aclsize
) + xvatsize
;
256 lrsize
= sizeof (lr_acl_create_t
);
259 itx
= zil_itx_create(txtype
, txsize
);
261 lr
= (lr_create_t
*)&itx
->itx_lr
;
262 lr
->lr_doid
= dzp
->z_id
;
263 lr
->lr_foid
= zp
->z_id
;
264 lr
->lr_mode
= zp
->z_phys
->zp_mode
;
265 if (!IS_EPHEMERAL(zp
->z_phys
->zp_uid
)) {
266 lr
->lr_uid
= (uint64_t)zp
->z_phys
->zp_uid
;
268 lr
->lr_uid
= fuidp
->z_fuid_owner
;
270 if (!IS_EPHEMERAL(zp
->z_phys
->zp_gid
)) {
271 lr
->lr_gid
= (uint64_t)zp
->z_phys
->zp_gid
;
273 lr
->lr_gid
= fuidp
->z_fuid_group
;
275 lr
->lr_gen
= zp
->z_phys
->zp_gen
;
276 lr
->lr_crtime
[0] = zp
->z_phys
->zp_crtime
[0];
277 lr
->lr_crtime
[1] = zp
->z_phys
->zp_crtime
[1];
278 lr
->lr_rdev
= zp
->z_phys
->zp_rdev
;
281 * Fill in xvattr info if any
283 if (vap
->va_mask
& AT_XVATTR
) {
284 zfs_log_xvattr((lr_attr_t
*)((caddr_t
)lr
+ lrsize
), xvap
);
285 end
= (caddr_t
)lr
+ lrsize
+ xvatsize
;
287 end
= (caddr_t
)lr
+ lrsize
;
290 /* Now fill in any ACL info */
293 lracl
= (lr_acl_create_t
*)&itx
->itx_lr
;
294 lracl
->lr_aclcnt
= vsecp
->vsa_aclcnt
;
295 lracl
->lr_acl_bytes
= aclsize
;
296 lracl
->lr_domcnt
= fuidp
? fuidp
->z_domain_cnt
: 0;
297 lracl
->lr_fuidcnt
= fuidp
? fuidp
->z_fuid_cnt
: 0;
298 if (vsecp
->vsa_aclflags
& VSA_ACE_ACLFLAGS
)
299 lracl
->lr_acl_flags
= (uint64_t)vsecp
->vsa_aclflags
;
301 lracl
->lr_acl_flags
= 0;
303 bcopy(vsecp
->vsa_aclentp
, end
, aclsize
);
304 end
= (caddr_t
)end
+ ZIL_ACE_LENGTH(aclsize
);
307 /* drop in FUID info */
309 end
= zfs_log_fuid_ids(fuidp
, end
);
310 end
= zfs_log_fuid_domains(fuidp
, end
);
313 * Now place file name in log record
315 bcopy(name
, end
, namesize
);
317 seq
= zil_itx_assign(zilog
, itx
, tx
);
318 dzp
->z_last_itx
= seq
;
319 zp
->z_last_itx
= seq
;
323 * zfs_log_remove() handles both TX_REMOVE and TX_RMDIR transactions.
326 zfs_log_remove(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
327 znode_t
*dzp
, char *name
)
332 size_t namesize
= strlen(name
) + 1;
337 itx
= zil_itx_create(txtype
, sizeof (*lr
) + namesize
);
338 lr
= (lr_remove_t
*)&itx
->itx_lr
;
339 lr
->lr_doid
= dzp
->z_id
;
340 bcopy(name
, (char *)(lr
+ 1), namesize
);
342 seq
= zil_itx_assign(zilog
, itx
, tx
);
343 dzp
->z_last_itx
= seq
;
347 * zfs_log_link() handles TX_LINK transactions.
350 zfs_log_link(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
351 znode_t
*dzp
, znode_t
*zp
, char *name
)
356 size_t namesize
= strlen(name
) + 1;
361 itx
= zil_itx_create(txtype
, sizeof (*lr
) + namesize
);
362 lr
= (lr_link_t
*)&itx
->itx_lr
;
363 lr
->lr_doid
= dzp
->z_id
;
364 lr
->lr_link_obj
= zp
->z_id
;
365 bcopy(name
, (char *)(lr
+ 1), namesize
);
367 seq
= zil_itx_assign(zilog
, itx
, tx
);
368 dzp
->z_last_itx
= seq
;
369 zp
->z_last_itx
= seq
;
373 * zfs_log_symlink() handles TX_SYMLINK transactions.
376 zfs_log_symlink(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
377 znode_t
*dzp
, znode_t
*zp
, char *name
, char *link
)
382 size_t namesize
= strlen(name
) + 1;
383 size_t linksize
= strlen(link
) + 1;
388 itx
= zil_itx_create(txtype
, sizeof (*lr
) + namesize
+ linksize
);
389 lr
= (lr_create_t
*)&itx
->itx_lr
;
390 lr
->lr_doid
= dzp
->z_id
;
391 lr
->lr_foid
= zp
->z_id
;
392 lr
->lr_mode
= zp
->z_phys
->zp_mode
;
393 lr
->lr_uid
= zp
->z_phys
->zp_uid
;
394 lr
->lr_gid
= zp
->z_phys
->zp_gid
;
395 lr
->lr_gen
= zp
->z_phys
->zp_gen
;
396 lr
->lr_crtime
[0] = zp
->z_phys
->zp_crtime
[0];
397 lr
->lr_crtime
[1] = zp
->z_phys
->zp_crtime
[1];
398 bcopy(name
, (char *)(lr
+ 1), namesize
);
399 bcopy(link
, (char *)(lr
+ 1) + namesize
, linksize
);
401 seq
= zil_itx_assign(zilog
, itx
, tx
);
402 dzp
->z_last_itx
= seq
;
403 zp
->z_last_itx
= seq
;
407 * zfs_log_rename() handles TX_RENAME transactions.
410 zfs_log_rename(zilog_t
*zilog
, dmu_tx_t
*tx
, uint64_t txtype
,
411 znode_t
*sdzp
, char *sname
, znode_t
*tdzp
, char *dname
, znode_t
*szp
)
416 size_t snamesize
= strlen(sname
) + 1;
417 size_t dnamesize
= strlen(dname
) + 1;
422 itx
= zil_itx_create(txtype
, sizeof (*lr
) + snamesize
+ dnamesize
);
423 lr
= (lr_rename_t
*)&itx
->itx_lr
;
424 lr
->lr_sdoid
= sdzp
->z_id
;
425 lr
->lr_tdoid
= tdzp
->z_id
;
426 bcopy(sname
, (char *)(lr
+ 1), snamesize
);
427 bcopy(dname
, (char *)(lr
+ 1) + snamesize
, dnamesize
);
429 seq
= zil_itx_assign(zilog
, itx
, tx
);
430 sdzp
->z_last_itx
= seq
;
431 tdzp
->z_last_itx
= seq
;
432 szp
->z_last_itx
= seq
;
436 * zfs_log_write() handles TX_WRITE transactions.
438 ssize_t zfs_immediate_write_sz
= 32768;
440 #define ZIL_MAX_LOG_DATA (SPA_MAXBLOCKSIZE - sizeof (zil_trailer_t) - \
444 zfs_log_write(zilog_t
*zilog
, dmu_tx_t
*tx
, int txtype
,
445 znode_t
*zp
, offset_t off
, ssize_t resid
, int ioflag
)
447 itx_wr_state_t write_state
;
451 if (zilog
== NULL
|| zp
->z_unlinked
)
455 * Writes are handled in three different ways:
458 * In this mode, if we need to commit the write later, then the block
459 * is immediately written into the file system (using dmu_sync),
460 * and a pointer to the block is put into the log record.
461 * When the txg commits the block is linked in.
462 * This saves additionally writing the data into the log record.
463 * There are a few requirements for this to occur:
464 * - write is greater than zfs_immediate_write_sz
465 * - not using slogs (as slogs are assumed to always be faster
466 * than writing into the main pool)
467 * - the write occupies only one block
469 * If we know we'll immediately be committing the
470 * transaction (FSYNC or FDSYNC), the we allocate a larger
471 * log record here for the data and copy the data in.
473 * Otherwise we don't allocate a buffer, and *if* we need to
474 * flush the write later then a buffer is allocated and
475 * we retrieve the data using the dmu.
477 slogging
= spa_has_slogs(zilog
->zl_spa
);
478 if (resid
> zfs_immediate_write_sz
&& !slogging
&& resid
<= zp
->z_blksz
)
479 write_state
= WR_INDIRECT
;
480 else if (ioflag
& (FSYNC
| FDSYNC
))
481 write_state
= WR_COPIED
;
483 write_state
= WR_NEED_COPY
;
485 if ((fsync_cnt
= (uintptr_t)tsd_get(zfs_fsyncer_key
)) != 0) {
486 (void) tsd_set(zfs_fsyncer_key
, (void *)(fsync_cnt
- 1));
495 * If the write would overflow the largest block then split it.
497 if (write_state
!= WR_INDIRECT
&& resid
> ZIL_MAX_LOG_DATA
)
498 len
= SPA_MAXBLOCKSIZE
>> 1;
502 itx
= zil_itx_create(txtype
, sizeof (*lr
) +
503 (write_state
== WR_COPIED
? len
: 0));
504 lr
= (lr_write_t
*)&itx
->itx_lr
;
505 if (write_state
== WR_COPIED
&& dmu_read(zp
->z_zfsvfs
->z_os
,
506 zp
->z_id
, off
, len
, lr
+ 1) != 0) {
507 kmem_free(itx
, offsetof(itx_t
, itx_lr
) +
508 itx
->itx_lr
.lrc_reclen
);
509 itx
= zil_itx_create(txtype
, sizeof (*lr
));
510 lr
= (lr_write_t
*)&itx
->itx_lr
;
511 write_state
= WR_NEED_COPY
;
514 itx
->itx_wr_state
= write_state
;
515 if (write_state
== WR_NEED_COPY
)
517 lr
->lr_foid
= zp
->z_id
;
521 BP_ZERO(&lr
->lr_blkptr
);
523 itx
->itx_private
= zp
->z_zfsvfs
;
525 if ((zp
->z_sync_cnt
!= 0) || (fsync_cnt
!= 0) ||
526 (ioflag
& (FSYNC
| FDSYNC
)))
527 itx
->itx_sync
= B_TRUE
;
529 itx
->itx_sync
= B_FALSE
;
531 zp
->z_last_itx
= zil_itx_assign(zilog
, itx
, tx
);
539 * zfs_log_truncate() handles TX_TRUNCATE transactions.
542 zfs_log_truncate(zilog_t
*zilog
, dmu_tx_t
*tx
, int txtype
,
543 znode_t
*zp
, uint64_t off
, uint64_t len
)
549 if (zilog
== NULL
|| zp
->z_unlinked
)
552 itx
= zil_itx_create(txtype
, sizeof (*lr
));
553 lr
= (lr_truncate_t
*)&itx
->itx_lr
;
554 lr
->lr_foid
= zp
->z_id
;
558 itx
->itx_sync
= (zp
->z_sync_cnt
!= 0);
559 seq
= zil_itx_assign(zilog
, itx
, tx
);
560 zp
->z_last_itx
= seq
;
564 * zfs_log_setattr() handles TX_SETATTR transactions.
567 zfs_log_setattr(zilog_t
*zilog
, dmu_tx_t
*tx
, int txtype
,
568 znode_t
*zp
, vattr_t
*vap
, uint_t mask_applied
, zfs_fuid_info_t
*fuidp
)
573 xvattr_t
*xvap
= (xvattr_t
*)vap
;
574 size_t recsize
= sizeof (lr_setattr_t
);
578 if (zilog
== NULL
|| zp
->z_unlinked
)
582 * If XVATTR set, then log record size needs to allow
583 * for lr_attr_t + xvattr mask, mapsize and create time
584 * plus actual attribute values
586 if (vap
->va_mask
& AT_XVATTR
)
587 recsize
= sizeof (*lr
) + ZIL_XVAT_SIZE(xvap
->xva_mapsize
);
590 recsize
+= fuidp
->z_domain_str_sz
;
592 itx
= zil_itx_create(txtype
, recsize
);
593 lr
= (lr_setattr_t
*)&itx
->itx_lr
;
594 lr
->lr_foid
= zp
->z_id
;
595 lr
->lr_mask
= (uint64_t)mask_applied
;
596 lr
->lr_mode
= (uint64_t)vap
->va_mode
;
597 if ((mask_applied
& AT_UID
) && IS_EPHEMERAL(vap
->va_uid
))
598 lr
->lr_uid
= fuidp
->z_fuid_owner
;
600 lr
->lr_uid
= (uint64_t)vap
->va_uid
;
602 if ((mask_applied
& AT_GID
) && IS_EPHEMERAL(vap
->va_gid
))
603 lr
->lr_gid
= fuidp
->z_fuid_group
;
605 lr
->lr_gid
= (uint64_t)vap
->va_gid
;
607 lr
->lr_size
= (uint64_t)vap
->va_size
;
608 ZFS_TIME_ENCODE(&vap
->va_atime
, lr
->lr_atime
);
609 ZFS_TIME_ENCODE(&vap
->va_mtime
, lr
->lr_mtime
);
610 start
= (lr_setattr_t
*)(lr
+ 1);
611 if (vap
->va_mask
& AT_XVATTR
) {
612 zfs_log_xvattr((lr_attr_t
*)start
, xvap
);
613 start
= (caddr_t
)start
+ ZIL_XVAT_SIZE(xvap
->xva_mapsize
);
617 * Now stick on domain information if any on end
621 (void) zfs_log_fuid_domains(fuidp
, start
);
623 itx
->itx_sync
= (zp
->z_sync_cnt
!= 0);
624 seq
= zil_itx_assign(zilog
, itx
, tx
);
625 zp
->z_last_itx
= seq
;
629 * zfs_log_acl() handles TX_ACL transactions.
632 zfs_log_acl(zilog_t
*zilog
, dmu_tx_t
*tx
, znode_t
*zp
,
633 vsecattr_t
*vsecp
, zfs_fuid_info_t
*fuidp
)
642 size_t aclbytes
= vsecp
->vsa_aclentsz
;
644 if (zilog
== NULL
|| zp
->z_unlinked
)
647 txtype
= (zp
->z_zfsvfs
->z_version
< ZPL_VERSION_FUID
) ?
650 if (txtype
== TX_ACL
)
651 lrsize
= sizeof (*lr
);
653 lrsize
= sizeof (*lrv0
);
656 ((txtype
== TX_ACL
) ? ZIL_ACE_LENGTH(aclbytes
) : aclbytes
) +
657 (fuidp
? fuidp
->z_domain_str_sz
: 0) +
658 sizeof (uint64_t) * (fuidp
? fuidp
->z_fuid_cnt
: 0);
660 itx
= zil_itx_create(txtype
, txsize
);
662 lr
= (lr_acl_t
*)&itx
->itx_lr
;
663 lr
->lr_foid
= zp
->z_id
;
664 if (txtype
== TX_ACL
) {
665 lr
->lr_acl_bytes
= aclbytes
;
666 lr
->lr_domcnt
= fuidp
? fuidp
->z_domain_cnt
: 0;
667 lr
->lr_fuidcnt
= fuidp
? fuidp
->z_fuid_cnt
: 0;
668 if (vsecp
->vsa_mask
& VSA_ACE_ACLFLAGS
)
669 lr
->lr_acl_flags
= (uint64_t)vsecp
->vsa_aclflags
;
671 lr
->lr_acl_flags
= 0;
673 lr
->lr_aclcnt
= (uint64_t)vsecp
->vsa_aclcnt
;
675 if (txtype
== TX_ACL_V0
) {
676 lrv0
= (lr_acl_v0_t
*)lr
;
677 bcopy(vsecp
->vsa_aclentp
, (ace_t
*)(lrv0
+ 1), aclbytes
);
679 void *start
= (ace_t
*)(lr
+ 1);
681 bcopy(vsecp
->vsa_aclentp
, start
, aclbytes
);
683 start
= (caddr_t
)start
+ ZIL_ACE_LENGTH(aclbytes
);
686 start
= zfs_log_fuid_ids(fuidp
, start
);
687 (void) zfs_log_fuid_domains(fuidp
, start
);
691 itx
->itx_sync
= (zp
->z_sync_cnt
!= 0);
692 seq
= zil_itx_assign(zilog
, itx
, tx
);
693 zp
->z_last_itx
= seq
;