- /* locate quota admin files */
- for (i = 0; i < 2; i++) {
- fname = fnames[i];
- rc = dt_lookup_dir(env, parent, fname, &oti->oti_fid);
- if (rc == -ENOENT) {
- rc = 0;
- continue;
- } else if (rc) {
- CERROR("%s: Failed to lookup %s, rc:%d\n",
- osd->od_svname, fname, rc);
- GOTO(out, rc);
- }
-
- admin = dt_locate(env, &osd->od_dt_dev, &oti->oti_fid);
- if (IS_ERR(admin)) {
- CERROR("%s: Failed to locate %s "DFID", rc:%d\n",
- osd->od_svname, fname, PFID(&oti->oti_fid), rc);
- GOTO(out, rc = PTR_ERR(admin));
- }
-
- if (!dt_object_exists(admin)) {
- CERROR("%s: Old admin file %s doesn't exist, but is "
- "still referenced in parent directory.\n",
- osd->od_svname, fname);
- lu_object_put(env, &admin->do_lu);
- GOTO(out, rc = -ENOENT);
- }
-
- LCONSOLE_WARN("%s: Detected old quota admin file(%s)! If you "
- "want to keep the old quota limits settings, "
- "please upgrade to lower version(2.5) first to "
- "convert them into new format.\n",
- osd->od_svname, fname);
-
- lu_object_put(env, &admin->do_lu);
- GOTO(out, rc = -EINVAL);
- }
-out:
- if (parent && !IS_ERR(parent))
- lu_object_put(env, &parent->do_lu);
- lu_object_put(env, &root->do_lu);
- RETURN(rc);