Whamcloud - gitweb
LU-2129 llog: protect llog write against concurrent read
[fs/lustre-release.git] / lustre / obdclass / llog_cat.c
index 399293c..cc065c1 100644 (file)
@@ -830,10 +830,10 @@ int cat_cancel_cb(const struct lu_env *env, struct llog_handle *cathandle,
 
        rc = llog_cat_id2handle(env, cathandle, &loghandle, &lir->lid_id);
        if (rc) {
-               CERROR("%s: cannot find handle for llog "LPX64"\n",
+               CERROR("%s: cannot find handle for llog "LPX64"\n: %d",
                       loghandle->lgh_ctxt->loc_obd->obd_name,
-                      lir->lid_id.lgl_oid);
-               if (rc == -ENOENT) {
+                      lir->lid_id.lgl_oid, rc);
+               if (rc == -ENOENT || rc == -ESTALE) {
                        index = rec->lrh_index;
                        goto cat_cleanup;
                }
@@ -865,6 +865,7 @@ cat_cleanup:
 
        RETURN(rc);
 }
+EXPORT_SYMBOL(cat_cancel_cb);
 
 /* helper to initialize catalog llog and process it to cancel */
 int llog_cat_init_and_process(const struct lu_env *env,