From: Lai Siyao Date: Thu, 25 Oct 2018 16:10:34 +0000 (+0800) Subject: LU-11668 debug: print object type in mdd_parent_fid X-Git-Tag: 2.12.0-RC1~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=9a4a99b81a267a098b92ec10991af27b7f3cae7e;p=fs%2Flustre-release.git LU-11668 debug: print object type in mdd_parent_fid mdd_parent_fid() get parent fid for directory, but racer shows the passed in object is not directory, print its type to help debug. Test-Parameters: trivial Signed-off-by: Lai Siyao Signed-off-by: Peter Jones Change-Id: I4b3eedb159fc0efccc15e35cb59010fe02fa9e01 Reviewed-on: https://review.whamcloud.com/33700 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Bobi Jam --- diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index a2ecd51..14d0264 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -219,7 +219,10 @@ static inline int mdd_parent_fid(const struct lu_env *env, ENTRY; - LASSERT(S_ISDIR(mdd_object_type(obj))); + LASSERTF(S_ISDIR(mdd_object_type(obj)), + "%s: FID "DFID" is not a directory type = %o\n", + mdd_obj_dev_name(obj), PFID(mdd_object_fid(obj)), + mdd_object_type(obj)); buf = lu_buf_check_and_alloc(buf, PATH_MAX); if (buf->lb_buf == NULL)