cat_index = loghandle->u.phd.phd_cookie.lgc_index;
rc = llog_cat_cleanup(env, cathandle, loghandle, cat_index);
if (rc)
- CERROR("%s: fail to cancel catalog record: rc = %d\n",
+ CDEBUG(D_HA,
+ "%s: fail to cancel catalog record: rc = %d\n",
loghandle2name(cathandle), rc);
rc = 0;
}
llog_handle_put(env, loghandle);
-
- if (rc)
- CERROR("%s: fail to cancel %d llog-records: rc = %d\n",
- loghandle2name(cathandle), count, rc);
-
+ if (rc != -ENOENT && rc != -ESTALE && rc != -EIO)
+ CWARN("%s: fail to cancel %d records in "DFID": rc = %d\n",
+ loghandle2name(cathandle), count, PLOGID(lgl), rc);
RETURN(rc);
}
EXPORT_SYMBOL(llog_cat_cancel_arr_rec);
struct llog_handle *cathandle, int count,
struct llog_cookie *cookies)
{
- int i, rc = 0, failed = 0;
+ int i, rc = 0;
ENTRY;
int lrc;
lrc = llog_cat_cancel_arr_rec(env, cathandle, &cookies->lgc_lgl,
- 1, &cookies->lgc_index);
- if (lrc) {
- failed++;
- if (!rc)
- rc = lrc;
- }
+ 1, &cookies->lgc_index);
+ if (lrc && !rc)
+ rc = lrc;
}
- if (failed)
- CERROR("%s: fail to cancel %d of %d llog-records: rc = %d\n",
- loghandle2name(cathandle), failed, count, rc);
+
RETURN(rc);
}
EXPORT_SYMBOL(llog_cat_cancel_records);
return ERR_PTR(rc);
dir = dt_locate(env, dt, &dti->dti_fid);
- if (!IS_ERR(dir) && !dt_try_as_dir(env, dir, true)) {
+ if (!IS_ERR(dir) && !dt_try_as_dir(env, dir, false)) {
dt_object_put(env, dir);
return ERR_PTR(-ENOTDIR);
}
if (IS_ERR(dir))
RETURN(dir);
- if (!dt_try_as_dir(env, dir, true)) {
+ if (!dt_try_as_dir(env, dir, false)) {
dt_object_put(env, dir);
RETURN(ERR_PTR(-ENOTDIR));
}
((i * sizeof(int)) == arr_size ||
(list_empty(&list) && i > 0))) {
rc = llog_cat_cancel_arr_rec(env, llh, &lgid, i, arr);
-
- if (rc)
- CERROR("%s: can't cancel %d records: rc = %d\n",
- obd->obd_name, i, rc);
- else
- CDEBUG(D_OTHER, "%s: massive records cancel id "DFID" num %d\n",
- obd->obd_name, PLOGID(&lgid), i);
+ CDEBUG(D_OTHER,
+ "%s: cancel %d records in "DFID": rc = %d\n",
+ obd->obd_name, i, PLOGID(&lgid), rc);
i = 0;
}