- /* inode accounting is not maintained by DMU, so we use our own ZAP to
- * track inode usage */
- rc = -zap_lookup(osd->od_os, it->oiq_obj->oo_dn->dn_object,
- za->za_name, sizeof(uint64_t), 1, &rec->ispace);
+ /* inode accounting is maintained by DMU since 0.7.0 */
+ strncpy(info->oti_buf, OSD_DMU_USEROBJ_PREFIX,
+ OSD_DMU_USEROBJ_PREFIX_LEN);
+ strlcpy(info->oti_buf + OSD_DMU_USEROBJ_PREFIX_LEN, za->za_name,
+ sizeof(info->oti_buf) - OSD_DMU_USEROBJ_PREFIX_LEN);
+ rc = osd_zap_lookup(osd, it->oiq_obj->oo_dn->dn_object,
+ it->oiq_obj->oo_dn, info->oti_buf, sizeof(uint64_t),
+ 1, &rec->ispace);