From 5ef6f3459355e16fd27427e45ff417e93589c960 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Wed, 12 Jun 2024 17:07:07 -0700 Subject: [PATCH] LU-17948 pcc: fix llapi_pcc_del() -Werror=enum-int-mismatch gcc 13 does not allow mixing of enum and integer types between function declaration and implementation. This patch fixes the following build failures: liblustreapi_pcc.c:755:5: error: conflicting types for 'llapi_pcc_del' due to enum/integer mismatch; have 'int(const char *, const char *, enum lu_pcc_cleanup_flags)' [-Werror=enum-int-mismatch] 755 | int llapi_pcc_del(const char *mntpath, const char *pccpath, | ^~~~~~~~~~~~~ liblustreapi_pcc.c:790:5: error: conflicting types for 'llapi_pcc_clear' due to enum/integer mismatch; have 'int(const char *, enum lu_pcc_cleanup_flags)' [-Werror=enum-int-mismatch] 790 | int llapi_pcc_clear(const char *mntpath, enum lu_pcc_cleanup_flags flags) | ^~~~~~~~~~~~~~~ Test-Parameters: trivial testlist=sanity-pcc Change-Id: I2900b59a609410c6faab78d24f6176bc5c268e98 Fixes: 0d7d9ae ("LU-17657 build: gcc 13 stricter enum checking") Fixes: c74878c ("LU-12373 pcc: uncache the pcc copies when remove a PCC backend") Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55417 Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Reviewed-by: Qian Yingjin Tested-by: jenkins Tested-by: Maloo --- lustre/include/lustre/lustreapi.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/include/lustre/lustreapi.h b/lustre/include/lustre/lustreapi.h index caf15ae..ed7b8d4 100644 --- a/lustre/include/lustre/lustreapi.h +++ b/lustre/include/lustre/lustreapi.h @@ -721,8 +721,9 @@ int llapi_pcc_state_get_fd(int fd, struct lu_pcc_state *state); int llapi_pcc_state_get(const char *path, struct lu_pcc_state *state); int llapi_pccdev_set(const char *mntpath, const char *cmd); int llapi_pccdev_get(const char *mntpath); -int llapi_pcc_del(const char *mntpath, const char *pccpath, __u32 flags); -int llapi_pcc_clear(const char *mntpath, __u32 flags); +int llapi_pcc_del(const char *mntpath, const char *pccpath, + enum lu_pcc_cleanup_flags flags); +int llapi_pcc_clear(const char *mntpath, enum lu_pcc_cleanup_flags flags); /** @} llapi */ /* llapi_layout user interface */ -- 1.8.3.1