ENTRY;
LASSERT(fid_is_acct(fid));
- if (!LDISKFS_HAS_RO_COMPAT_FEATURE(sb,
- LDISKFS_FEATURE_RO_COMPAT_QUOTA))
+ if (!ldiskfs_has_feature_quota(sb))
RETURN(-ENOENT);
id->oii_gen = OSD_OII_NOGEN;
break;
case PRJQUOTA:
#ifdef HAVE_PROJECT_QUOTA
- if (LDISKFS_HAS_RO_COMPAT_FEATURE(sb,
- LDISKFS_FEATURE_RO_COMPAT_PROJECT))
+ if (ldiskfs_has_feature_project(sb))
id->oii_ino =
le32_to_cpu(LDISKFS_SB(sb)->s_es->s_prj_quota_inum);
else
static int osd_it_acct_load(const struct lu_env *env,
const struct dt_it *di, __u64 hash)
{
+ struct osd_it_quota *it = (struct osd_it_quota *)di;
+
ENTRY;
+
+ /* LU-8999 - If it is called to resume the iteration, calling
+ * osd_it_acct_get could change the block orders in the lower level
+ * of the quota tree, which are saved in osd_it_quota->oiq_blk.
+ * */
+ if (it->oiq_id != 0 && it->oiq_id == hash)
+ RETURN(1);
+
RETURN(osd_it_acct_get(env, (struct dt_it *)di,
(const struct dt_key *)&hash));
}