Lines Matching defs:zp

71 zfs_sa_readlink(znode_t *zp, uio_t *uio)
73 dmu_buf_t *db = sa_get_db(zp->z_sa_hdl);
77 bufsz = zp->z_size;
84 if ((error = dmu_buf_hold(zp->z_zfsvfs->z_os, zp->z_id,
95 zfs_sa_symlink(znode_t *zp, char *link, int len, dmu_tx_t *tx)
97 dmu_buf_t *db = sa_get_db(zp->z_sa_hdl);
109 zfs_grow_blocksize(zp, len, tx);
110 VERIFY(0 == dmu_buf_hold(zp->z_zfsvfs->z_os,
111 zp->z_id, 0, FTAG, &dbp, DMU_READ_NO_PREFETCH));
122 zfs_sa_get_scanstamp(znode_t *zp, xvattr_t *xvap)
124 zfsvfs_t *zfsvfs = zp->z_zfsvfs;
127 ASSERT_VOP_LOCKED(ZTOV(zp), __func__);
129 if (zp->z_is_sa) {
130 if (sa_lookup(zp->z_sa_hdl, SA_ZPL_SCANSTAMP(zfsvfs),
136 dmu_buf_t *db = sa_get_db(zp->z_sa_hdl);
139 if (!(zp->z_pflags & ZFS_BONUS_SCANSTAMP))
142 sa_object_info(zp->z_sa_hdl, &doi);
156 zfs_sa_set_scanstamp(znode_t *zp, xvattr_t *xvap, dmu_tx_t *tx)
158 zfsvfs_t *zfsvfs = zp->z_zfsvfs;
161 ASSERT_VOP_ELOCKED(ZTOV(zp), __func__);
163 if (zp->z_is_sa)
164 VERIFY(0 == sa_update(zp->z_sa_hdl, SA_ZPL_SCANSTAMP(zfsvfs),
169 dmu_buf_t *db = sa_get_db(zp->z_sa_hdl);
172 sa_object_info(zp->z_sa_hdl, &doi);
180 zp->z_pflags |= ZFS_BONUS_SCANSTAMP;
181 VERIFY(0 == sa_update(zp->z_sa_hdl, SA_ZPL_FLAGS(zfsvfs),
182 &zp->z_pflags, sizeof (uint64_t), tx));
198 znode_t *zp = sa_get_userdata(hdl);
199 zfsvfs_t *zfsvfs = zp->z_zfsvfs;
215 if (zp->z_acl_cached == NULL || ZTOV(zp)->v_type == VLNK)
227 if (vn_lock(ZTOV(zp), LK_EXCLUSIVE | LK_NOWAIT) != 0)
254 &zp->z_size, 8);
256 NULL, &zp->z_gen, 8);
262 &zp->z_pflags, 8);
264 zp->z_atime, 16);
272 &zp->z_links, 8);
273 if (zp->z_vnode->v_type == VBLK || zp->z_vnode->v_type == VCHR)
277 &zp->z_acl_cached->z_acl_count, 8);
279 if (zp->z_acl_cached->z_version < ZFS_ACL_VERSION_FUID)
280 zfs_acl_xform(zp, zp->z_acl_cached, CRED());
282 locate.cb_aclp = zp->z_acl_cached;
284 zfs_acl_data_locator, &locate, zp->z_acl_cached->z_acl_bytes);
292 if (zp->z_pflags & ZFS_BONUS_SCANSTAMP) {
297 zp->z_pflags &= ~ZFS_BONUS_SCANSTAMP;
307 zp->z_is_sa = B_TRUE;
309 VOP_UNLOCK(ZTOV(zp), 0);
313 zfs_sa_upgrade_txholds(dmu_tx_t *tx, znode_t *zp)
315 if (!zp->z_zfsvfs->z_use_sa || zp->z_is_sa)
319 dmu_tx_hold_sa(tx, zp->z_sa_hdl, B_TRUE);
321 if (zfs_external_acl(zp)) {
322 dmu_tx_hold_free(tx, zfs_external_acl(zp), 0,