From 226f586c438291f8723decc61469b2812760263d Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 11 Sep 2013 14:26:43 -0400 Subject: [PATCH] LU-2842 mdt: Do not lbug on invalid fid entry in name 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 Reviewed-on: http://review.whamcloud.com/7617 Tested-by: Hudson Tested-by: Maloo Reviewed-by: wangdi Reviewed-by: Bob Glossman --- lustre/mdt/mdt_open.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index d3c3081..3712ae3 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -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); } } } -- 1.8.3.1