mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Revert "Kill znode->z_gen field"
This reverts commit 4cd77889b6. The
i_generation field in the inode is 32-bit and the SA code expects
64-bit fixed values. Revert this optimization for now until
this is cleanly addressed.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4538
This commit is contained in:
@@ -542,6 +542,7 @@ zfs_inode_update_impl(znode_t *zp, boolean_t new)
|
||||
dmu_object_size_from_db(sa_get_db(zp->z_sa_hdl), &blksize, &i_blocks);
|
||||
|
||||
spin_lock(&ip->i_lock);
|
||||
ip->i_generation = zp->z_gen;
|
||||
ip->i_uid = SUID_TO_KUID(zp->z_uid);
|
||||
ip->i_gid = SGID_TO_KGID(zp->z_gid);
|
||||
set_nlink(ip, zp->z_links);
|
||||
@@ -622,8 +623,7 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
|
||||
zfs_znode_sa_init(zsb, zp, db, obj_type, hdl);
|
||||
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MODE(zsb), NULL, &mode, 8);
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_GEN(zsb), NULL,
|
||||
&ip->i_generation, 8);
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_GEN(zsb), NULL, &zp->z_gen, 8);
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_SIZE(zsb), NULL, &zp->z_size, 8);
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_LINKS(zsb), NULL, &zp->z_links, 8);
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_FLAGS(zsb), NULL,
|
||||
@@ -633,9 +633,7 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_UID(zsb), NULL, &zp->z_uid, 8);
|
||||
SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_GID(zsb), NULL, &zp->z_gid, 8);
|
||||
|
||||
if (sa_bulk_lookup(zp->z_sa_hdl, bulk, count) != 0 ||
|
||||
ip->i_generation == 0) {
|
||||
|
||||
if (sa_bulk_lookup(zp->z_sa_hdl, bulk, count) != 0 || zp->z_gen == 0) {
|
||||
if (hdl == NULL)
|
||||
sa_handle_destroy(zp->z_sa_hdl);
|
||||
zp->z_sa_hdl = NULL;
|
||||
@@ -1231,7 +1229,7 @@ zfs_rezget(znode_t *zp)
|
||||
|
||||
zp->z_mode = mode;
|
||||
|
||||
if (gen != ZTOI(zp)->i_generation) {
|
||||
if (gen != zp->z_gen) {
|
||||
zfs_znode_dmu_fini(zp);
|
||||
zfs_znode_hold_exit(zsb, zh);
|
||||
return (SET_ERROR(EIO));
|
||||
|
||||
Reference in New Issue
Block a user