Whamcloud - gitweb
LU-2842 mdt: Do not lbug on invalid fid entry in name 17/7617/3
authorOleg Drokin <oleg.drokin@intel.com>
Wed, 11 Sep 2013 18:26:43 +0000 (14:26 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 28 Oct 2013 15:42:21 +0000 (15:42 +0000)
Instead of crashing MDS when the name exists but has invalid fid,
we should just return error and let lfsck deal with it later.

Change-Id: Iea19dac75e9dc75c43a18efa757fc1c5e4d1743e
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7617
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
lustre/mdt/mdt_open.c

index d3c3081..3712ae3 100644 (file)
@@ -1806,8 +1806,11 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
                                ma->ma_need |= MA_HSM;
                                result = mdt_attr_get_complex(info, child, ma);
                        } else {
-                               /*object non-exist!!!*/
-                               LBUG();
+                               /*object non-exist!!! Likely an fs corruption*/
+                               CERROR("%s: name %s present, but fid " DFID
+                                      " invalid\n",mdt_obd_name(info->mti_mdt),
+                                      rr->rr_name, PFID(child_fid));
+                               GOTO(out_child, result = -EIO);
                        }
                }
         }