Lines Matching refs:lr

303 	_lr_create_t *lr;  in zfs_log_create()  local
345 lr = (_lr_create_t *)&itx->itx_lr; in zfs_log_create()
346 lr->lr_doid = dzp->z_id; in zfs_log_create()
347 lr->lr_foid = zp->z_id; in zfs_log_create()
349 LR_FOID_SET_SLOTS(lr->lr_foid, zp->z_dnodesize >> DNODE_SHIFT); in zfs_log_create()
350 lr->lr_mode = zp->z_mode; in zfs_log_create()
352 lr->lr_uid = (uint64_t)KUID_TO_SUID(ZTOUID(zp)); in zfs_log_create()
354 lr->lr_uid = fuidp->z_fuid_owner; in zfs_log_create()
357 lr->lr_gid = (uint64_t)KGID_TO_SGID(ZTOGID(zp)); in zfs_log_create()
359 lr->lr_gid = fuidp->z_fuid_group; in zfs_log_create()
361 (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(ZTOZSB(zp)), &lr->lr_gen, in zfs_log_create()
364 lr->lr_crtime, sizeof (uint64_t) * 2); in zfs_log_create()
366 if (sa_lookup(zp->z_sa_hdl, SA_ZPL_RDEV(ZTOZSB(zp)), &lr->lr_rdev, in zfs_log_create()
367 sizeof (lr->lr_rdev)) != 0) in zfs_log_create()
368 lr->lr_rdev = 0; in zfs_log_create()
416 lr_remove_t *lr; in zfs_log_remove() local
422 itx = zil_itx_create(txtype, sizeof (*lr) + namesize); in zfs_log_remove()
423 lr = (lr_remove_t *)&itx->itx_lr; in zfs_log_remove()
424 lr->lr_doid = dzp->z_id; in zfs_log_remove()
425 memcpy(&lr->lr_data[0], name, namesize); in zfs_log_remove()
451 lr_link_t *lr; in zfs_log_link() local
457 itx = zil_itx_create(txtype, sizeof (*lr) + namesize); in zfs_log_link()
458 lr = (lr_link_t *)&itx->itx_lr; in zfs_log_link()
459 lr->lr_doid = dzp->z_id; in zfs_log_link()
460 lr->lr_link_obj = zp->z_id; in zfs_log_link()
461 memcpy(&lr->lr_data[0], name, namesize); in zfs_log_link()
474 _lr_create_t *lr; in zfs_log_symlink() local
484 lr = &lrc->lr_create; in zfs_log_symlink()
485 lr->lr_doid = dzp->z_id; in zfs_log_symlink()
486 lr->lr_foid = zp->z_id; in zfs_log_symlink()
487 lr->lr_uid = KUID_TO_SUID(ZTOUID(zp)); in zfs_log_symlink()
488 lr->lr_gid = KGID_TO_SGID(ZTOGID(zp)); in zfs_log_symlink()
489 lr->lr_mode = zp->z_mode; in zfs_log_symlink()
490 (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(ZTOZSB(zp)), &lr->lr_gen, in zfs_log_symlink()
493 lr->lr_crtime, sizeof (uint64_t) * 2); in zfs_log_symlink()
505 _lr_rename_t *lr; in do_zfs_log_rename() local
513 itx = zil_itx_create(txtype, sizeof (*lr) + snamesize + dnamesize); in do_zfs_log_rename()
515 lr = &lrr->lr_rename; in do_zfs_log_rename()
516 lr->lr_sdoid = sdzp->z_id; in do_zfs_log_rename()
517 lr->lr_tdoid = tdzp->z_id; in do_zfs_log_rename()
560 lr_rename_whiteout_t *lr; in zfs_log_rename_whiteout() local
568 itx = zil_itx_create(txtype, sizeof (*lr) + snamesize + dnamesize); in zfs_log_rename_whiteout()
569 lr = (lr_rename_whiteout_t *)&itx->itx_lr; in zfs_log_rename_whiteout()
570 lr->lr_rename.lr_sdoid = sdzp->z_id; in zfs_log_rename_whiteout()
571 lr->lr_rename.lr_tdoid = tdzp->z_id; in zfs_log_rename_whiteout()
578 lr->lr_wfoid = wzp->z_id; in zfs_log_rename_whiteout()
579 LR_FOID_SET_SLOTS(lr->lr_wfoid, wzp->z_dnodesize >> DNODE_SHIFT); in zfs_log_rename_whiteout()
580 (void) sa_lookup(wzp->z_sa_hdl, SA_ZPL_GEN(ZTOZSB(wzp)), &lr->lr_wgen, in zfs_log_rename_whiteout()
583 lr->lr_wcrtime, sizeof (uint64_t) * 2); in zfs_log_rename_whiteout()
584 lr->lr_wmode = wzp->z_mode; in zfs_log_rename_whiteout()
585 lr->lr_wuid = (uint64_t)KUID_TO_SUID(ZTOUID(wzp)); in zfs_log_rename_whiteout()
586 lr->lr_wgid = (uint64_t)KGID_TO_SGID(ZTOGID(wzp)); in zfs_log_rename_whiteout()
594 (void) sa_lookup(wzp->z_sa_hdl, SA_ZPL_RDEV(ZTOZSB(wzp)), &lr->lr_wrdev, in zfs_log_rename_whiteout()
595 sizeof (lr->lr_wrdev)); in zfs_log_rename_whiteout()
597 memcpy(&lr->lr_data[0], sname, snamesize); in zfs_log_rename_whiteout()
598 memcpy(&lr->lr_data[snamesize], dname, dnamesize); in zfs_log_rename_whiteout()
644 lr_write_t *lr; in zfs_log_write() local
660 itx = zil_itx_create(txtype, sizeof (*lr) + in zfs_log_write()
662 lr = (lr_write_t *)&itx->itx_lr; in zfs_log_write()
671 &lr->lr_data[0], DMU_READ_NO_PREFETCH); in zfs_log_write()
675 itx = zil_itx_create(txtype, sizeof (*lr)); in zfs_log_write()
676 lr = (lr_write_t *)&itx->itx_lr; in zfs_log_write()
682 lr->lr_foid = zp->z_id; in zfs_log_write()
683 lr->lr_offset = off; in zfs_log_write()
684 lr->lr_length = len; in zfs_log_write()
685 lr->lr_blkoff = 0; in zfs_log_write()
686 BP_ZERO(&lr->lr_blkptr); in zfs_log_write()
713 lr_truncate_t *lr; in zfs_log_truncate() local
719 itx = zil_itx_create(txtype, sizeof (*lr)); in zfs_log_truncate()
720 lr = (lr_truncate_t *)&itx->itx_lr; in zfs_log_truncate()
721 lr->lr_foid = zp->z_id; in zfs_log_truncate()
722 lr->lr_offset = off; in zfs_log_truncate()
723 lr->lr_length = len; in zfs_log_truncate()
737 lr_setattr_t *lr; in zfs_log_setattr() local
751 recsize = sizeof (*lr) + ZIL_XVAT_SIZE(xvap->xva_mapsize); in zfs_log_setattr()
757 lr = (lr_setattr_t *)&itx->itx_lr; in zfs_log_setattr()
758 lr->lr_foid = zp->z_id; in zfs_log_setattr()
759 lr->lr_mask = (uint64_t)mask_applied; in zfs_log_setattr()
760 lr->lr_mode = (uint64_t)vap->va_mode; in zfs_log_setattr()
762 lr->lr_uid = fuidp->z_fuid_owner; in zfs_log_setattr()
764 lr->lr_uid = (uint64_t)vap->va_uid; in zfs_log_setattr()
767 lr->lr_gid = fuidp->z_fuid_group; in zfs_log_setattr()
769 lr->lr_gid = (uint64_t)vap->va_gid; in zfs_log_setattr()
771 lr->lr_size = (uint64_t)vap->va_size; in zfs_log_setattr()
772 ZFS_TIME_ENCODE(&vap->va_atime, lr->lr_atime); in zfs_log_setattr()
773 ZFS_TIME_ENCODE(&vap->va_mtime, lr->lr_mtime); in zfs_log_setattr()
774 start = &lr->lr_data[0]; in zfs_log_setattr()
777 start = &lr->lr_data[ZIL_XVAT_SIZE(xvap->xva_mapsize)]; in zfs_log_setattr()
799 lr_setsaxattr_t *lr; in zfs_log_setsaxattr() local
809 lr = (lr_setsaxattr_t *)&itx->itx_lr; in zfs_log_setsaxattr()
810 lr->lr_foid = zp->z_id; in zfs_log_setsaxattr()
811 memcpy(&lr->lr_data[0], name, namelen); in zfs_log_setsaxattr()
813 memcpy(&lr->lr_data[namelen], value, size); in zfs_log_setsaxattr()
814 lr->lr_size = size; in zfs_log_setsaxattr()
816 lr->lr_size = 0; in zfs_log_setsaxattr()
832 lr_acl_t *lr; in zfs_log_acl() local
845 lrsize = sizeof (*lr); in zfs_log_acl()
856 lr = (lr_acl_t *)&itx->itx_lr; in zfs_log_acl()
857 lr->lr_foid = zp->z_id; in zfs_log_acl()
859 lr->lr_acl_bytes = aclbytes; in zfs_log_acl()
860 lr->lr_domcnt = fuidp ? fuidp->z_domain_cnt : 0; in zfs_log_acl()
861 lr->lr_fuidcnt = fuidp ? fuidp->z_fuid_cnt : 0; in zfs_log_acl()
863 lr->lr_acl_flags = (uint64_t)vsecp->vsa_aclflags; in zfs_log_acl()
865 lr->lr_acl_flags = 0; in zfs_log_acl()
867 lr->lr_aclcnt = (uint64_t)vsecp->vsa_aclcnt; in zfs_log_acl()
870 lrv0 = (lr_acl_v0_t *)lr; in zfs_log_acl()
873 uint8_t *start = &lr->lr_data[0]; in zfs_log_acl()
877 start = &lr->lr_data[ZIL_ACE_LENGTH(aclbytes)]; in zfs_log_acl()
898 lr_clone_range_t *lr; in zfs_log_clone_range() local
914 sizeof (*lr) + sizeof (bps[0]) * partnbps); in zfs_log_clone_range()
915 lr = (lr_clone_range_t *)&itx->itx_lr; in zfs_log_clone_range()
916 lr->lr_foid = zp->z_id; in zfs_log_clone_range()
917 lr->lr_offset = off; in zfs_log_clone_range()
918 lr->lr_length = partlen; in zfs_log_clone_range()
919 lr->lr_blksz = blksz; in zfs_log_clone_range()
920 lr->lr_nbps = partnbps; in zfs_log_clone_range()
921 memcpy(lr->lr_bps, bps, sizeof (bps[0]) * partnbps); in zfs_log_clone_range()