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

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I1934be855f9a1ad8d45750bd7e8330e81a888545
Reviewed-on: http://review.whamcloud.com/4163
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/llog_obd.c

index 946bdec..1738176 100644 (file)
@@ -310,9 +310,9 @@ static int cat_cancel_cb(struct llog_handle *cathandle,
 
         rc = llog_cat_id2handle(cathandle, &loghandle, &lir->lid_id);
         if (rc) {
-                CERROR("Cannot find handle for log "LPX64"\n",
-                       lir->lid_id.lgl_oid);
-                if (rc == -ENOENT) {
+                CERROR("Cannot find handle for log "LPX64": %d\n",
+                       lir->lid_id.lgl_oid, rc);
+                if (rc == -ENOENT || rc == -ESTALE) {
                         index = rec->lrh_index;
                         goto cat_cleanup;
                 }