Whamcloud - gitweb
LU-1749 llog: MDT should work if cancel llog failed with -ESTALE
authorLai Siyao <laisiyao@whamcloud.com>
Wed, 3 Oct 2012 04:11:05 +0000 (12:11 +0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Oct 2012 21:22:05 +0000 (17:22 -0400)
Cancel catlog may be stale, in this case MDT should continue to work.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Ib8cad1e2c935e73da0805875e3163f1a59edaeb5
Reviewed-on: http://review.whamcloud.com/3708
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/llog_cat.c

index 3af0c8d..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) {
 
        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,
                       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;
                }
                        index = rec->lrh_index;
                        goto cat_cleanup;
                }