Print this page
3752 want more verifiable dbuf user eviction
Submitted by:   Justin Gibbs <justing@spectralogic.com>
Submitted by:   Will Andrews <willa@spectralogic.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zfs_znode.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_znode.c
↓ open down ↓ 1122 lines elided ↑ open up ↑
1123 1123          dmu_object_info_from_db(db, &doi);
1124 1124          if (doi.doi_bonus_type != DMU_OT_SA &&
1125 1125              (doi.doi_bonus_type != DMU_OT_ZNODE ||
1126 1126              (doi.doi_bonus_type == DMU_OT_ZNODE &&
1127 1127              doi.doi_bonus_size < sizeof (znode_phys_t)))) {
1128 1128                  sa_buf_rele(db, NULL);
1129 1129                  ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
1130 1130                  return (SET_ERROR(EINVAL));
1131 1131          }
1132 1132  
1133      -        hdl = dmu_buf_get_user(db);
     1133 +        hdl = (sa_handle_t *)dmu_buf_get_user(db);
1134 1134          if (hdl != NULL) {
1135 1135                  zp  = sa_get_userdata(hdl);
1136 1136  
1137 1137  
1138 1138                  /*
1139 1139                   * Since "SA" does immediate eviction we
1140 1140                   * should never find a sa handle that doesn't
1141 1141                   * know about the znode.
1142 1142                   */
1143 1143  
↓ open down ↓ 1005 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX