182 &zp->z_pflags, sizeof (uint64_t), tx));
183 }
184 }
185
186 /*
187 * I'm not convinced we should do any of this upgrade.
188 * since the SA code can read both old/new znode formats
189 * with probably little to no performance difference.
190 *
191 * All new files will be created with the new format.
192 */
193
194 void
195 zfs_sa_upgrade(sa_handle_t *hdl, dmu_tx_t *tx)
196 {
197 dmu_buf_t *db = sa_get_db(hdl);
198 znode_t *zp = sa_get_userdata(hdl);
199 zfsvfs_t *zfsvfs = zp->z_zfsvfs;
200 sa_bulk_attr_t bulk[20];
201 int count = 0;
202 sa_bulk_attr_t sa_attrs[20] = { 0 };
203 zfs_acl_locator_cb_t locate = { 0 };
204 uint64_t uid, gid, mode, rdev, xattr, parent;
205 uint64_t crtime[2], mtime[2], ctime[2];
206 zfs_acl_phys_t znode_acl;
207 char scanstamp[AV_SCANSTAMP_SZ];
208 boolean_t drop_lock = B_FALSE;
209
210 /*
211 * No upgrade if ACL isn't cached
212 * since we won't know which locks are held
213 * and ready the ACL would require special "locked"
214 * interfaces that would be messy
215 */
216 if (zp->z_acl_cached == NULL || ZTOV(zp)->v_type == VLNK)
217 return;
218
219 /*
220 * If the z_lock is held and we aren't the owner
221 * the just return since we don't want to deadlock
222 * trying to update the status of z_is_sa. This
|
182 &zp->z_pflags, sizeof (uint64_t), tx));
183 }
184 }
185
186 /*
187 * I'm not convinced we should do any of this upgrade.
188 * since the SA code can read both old/new znode formats
189 * with probably little to no performance difference.
190 *
191 * All new files will be created with the new format.
192 */
193
194 void
195 zfs_sa_upgrade(sa_handle_t *hdl, dmu_tx_t *tx)
196 {
197 dmu_buf_t *db = sa_get_db(hdl);
198 znode_t *zp = sa_get_userdata(hdl);
199 zfsvfs_t *zfsvfs = zp->z_zfsvfs;
200 sa_bulk_attr_t bulk[20];
201 int count = 0;
202 sa_bulk_attr_t sa_attrs[20] = { {NULL} };
203 zfs_acl_locator_cb_t locate = { 0 };
204 uint64_t uid, gid, mode, rdev, xattr, parent;
205 uint64_t crtime[2], mtime[2], ctime[2];
206 zfs_acl_phys_t znode_acl;
207 char scanstamp[AV_SCANSTAMP_SZ];
208 boolean_t drop_lock = B_FALSE;
209
210 /*
211 * No upgrade if ACL isn't cached
212 * since we won't know which locks are held
213 * and ready the ACL would require special "locked"
214 * interfaces that would be messy
215 */
216 if (zp->z_acl_cached == NULL || ZTOV(zp)->v_type == VLNK)
217 return;
218
219 /*
220 * If the z_lock is held and we aren't the owner
221 * the just return since we don't want to deadlock
222 * trying to update the status of z_is_sa. This
|