From 9a4a99b81a267a098b92ec10991af27b7f3cae7e Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Fri, 26 Oct 2018 00:10:34 +0800 Subject: [PATCH] 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 --- lustre/mdd/mdd_dir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 1.8.3.1