From 7155b844c39f0d444b6b94cad73ab7c9f6a8818f Mon Sep 17 00:00:00 2001 From: Sohei Koyama Date: Sun, 8 Dec 2024 22:59:39 +0900 Subject: [PATCH] LU-18518 ldiskfs: fix LC_SRC_NFS_FILLDIR_USE_CTX check When compiled with clang, these checks always failed, resulting in lustre device mount being stuck. Signed-off-by: Sohei Koyama Change-Id: I7bac750700b791046050964bdcd59c2f05d7d986 Test-Parameters: trivial Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57333 Tested-by: Maloo Tested-by: jenkins Reviewed-by: Jian Yu Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 4dc1b75..639835d 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1170,13 +1170,15 @@ lm_grant, [ AC_DEFUN([LC_SRC_NFS_FILLDIR_USE_CTX], [ LB2_LINUX_TEST_SRC([filldir_ctx], [ #include - ],[ + + int filldir(struct dir_context *ctx, const char* name, + int i, loff_t off, u64 tmp, unsigned temp); int filldir(struct dir_context *ctx, const char* name, int i, loff_t off, u64 tmp, unsigned temp) { return 0; } - + ],[ struct dir_context ctx = { .actor = filldir, }; @@ -4041,13 +4043,15 @@ AC_DEFUN([LC_HAVE_GET_RANDOM_U32_AND_U64], [ AC_DEFUN([LC_SRC_NFS_FILLDIR_USE_CTX_RETURN_BOOL], [ LB2_LINUX_TEST_SRC([filldir_ctx_return_bool], [ #include - ],[ + + bool filldir(struct dir_context *ctx, const char* name, + int i, loff_t off, u64 tmp, unsigned temp); bool filldir(struct dir_context *ctx, const char* name, int i, loff_t off, u64 tmp, unsigned temp) { return 0; } - + ],[ struct dir_context ctx = { .actor = filldir, }; -- 1.8.3.1