{
if (check) {
if (unlikely(!dt_object_exists(obj)))
- return 0;
+ RETURN(0);
if (unlikely(!S_ISDIR(lu_object_attr(&obj->do_lu))))
- return 0;
+ RETURN(0);
if (obj->do_index_ops)
return 1;
obj->do_ops->do_index_try(env, obj, &dt_directory_features);
+ EXIT;
return obj->do_index_ops != NULL;
}
EXPORT_SYMBOL(dt_try_as_dir);
struct top_multiple_thandle *tmt)
{
struct sub_thandle *st;
+ unsigned int debug = 0;
+ bool debug_done = false;
+
ENTRY;
if (OBD_FAIL_CHECK(OBD_FAIL_TGT_TXN_NO_CANCEL))
cookie = &stc->stc_cookie;
if (fid_is_zero(&cookie->lgc_lgl.lgl_oi.oi_fid))
continue;
-
+do_debug_run:
rc = llog_cat_cancel_records(env, ctxt->loc_handle, 1,
cookie);
CDEBUG(D_HA, "%s: batchid %llu cancel update log "
DFID".%u: rc = %d\n", obd->obd_name,
tmt->tmt_batchid, PLOGID(&cookie->lgc_lgl),
cookie->lgc_index, rc);
+ if (unlikely(rc == -ENOTDIR && !debug_done)) {
+ if (!debug) {
+ debug = libcfs_debug;
+ libcfs_debug |= D_TRACE | D_INFO |
+ D_OTHER | D_INODE |
+ D_RPCTRACE;
+ goto do_debug_run;
+ } else {
+ libcfs_debug = debug;
+ libcfs_debug_dumplog();
+ debug_done = true;
+ }
+ }
}
-
+ if (unlikely(debug && !debug_done))
+ libcfs_debug = debug;
llog_ctxt_put(ctxt);
}