Whamcloud - gitweb
LU-14518 libcfs: print CFS_FAIL_CHECK() location 51/53451/7
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Dec 2023 01:56:53 +0000 (18:56 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 4 Mar 2024 20:03:22 +0000 (20:03 +0000)
commit1a9bd418463871d0748340c5f5ac659291a05cc1
treee17c6c303834dff555f7dc043d3d308023274b90
parentd753dc75ad2a919e5fff3bc51c20b4569cd86a86
LU-14518 libcfs: print CFS_FAIL_CHECK() location

Print the file/function/line where cfs_fail_loc is hit.
This allows better debugging of issues with this code.

This adds the CDEBUG_LIMIT_LOC() macro to allow printing
the location passed to the caller instead of the function,
file, and line number where the macro is located.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ieadace61b014d3576c0535f181256c728c7ec6f8
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53451
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
libcfs/include/libcfs/libcfs_debug.h
libcfs/include/libcfs/libcfs_fail.h
libcfs/libcfs/fail.c