Whamcloud - gitweb
LU-11668 debug: print object type in mdd_parent_fid 00/33700/4
authorLai Siyao <lai.siyao@intel.com>
Thu, 25 Oct 2018 16:10:34 +0000 (00:10 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 29 Nov 2018 22:56:00 +0000 (22:56 +0000)
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 <lai.siyao@whamcloud.com>
Signed-off-by: Peter Jones <pjones@whamcloud.com>
Change-Id: I4b3eedb159fc0efccc15e35cb59010fe02fa9e01
Reviewed-on: https://review.whamcloud.com/33700
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
lustre/mdd/mdd_dir.c

index a2ecd51..14d0264 100644 (file)
@@ -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)