From 5839fd5d6e5d24d16af26a7bc36eef773289dbbe Mon Sep 17 00:00:00 2001 From: Li Xi Date: Thu, 3 Apr 2014 15:47:21 +0800 Subject: [PATCH] LU-4017 quota: add project quota support to system header System header contains the quota macros. Project quota support should be added to it so that user space utils can be compiled successfully This patch redefines some macros in the system header file, which avoids to change the sytem header file directly. Signed-off-by: Li Xi Signed-off-by: Wang Shilong Change-Id: I1ed8014b1050684891df43d4c3db3c2e90b7814c Reviewed-on: https://review.whamcloud.com/23946 Reviewed-by: Niu Yawei Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/include/lustre/lustre_user.h | 15 +++++++++++++++ lustre/utils/lfs.c | 3 --- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h index 5a2fc74..f1e7fc4 100644 --- a/lustre/include/lustre/lustre_user.h +++ b/lustre/include/lustre/lustre_user.h @@ -60,6 +60,21 @@ #endif /* __KERNEL__ */ #include +/* + * This is a temporary solution of adding quota type. + * Should be removed as soon as system header is updated. + */ +#undef LL_MAXQUOTAS +#define LL_MAXQUOTAS 2 +#undef INITQFNAMES +#define INITQFNAMES { \ + "user", /* USRQUOTA */ \ + "group", /* GRPQUOTA */ \ + "project", /* PRJQUOTA */ \ + "undefined", \ +}; +#define PRJQUOTA 2 + #if defined(__x86_64__) || defined(__ia64__) || defined(__ppc64__) || \ defined(__craynv) || defined(__mips64__) || defined(__powerpc64__) || \ defined(__aarch64__) diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 53f9437..2688808 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -60,9 +60,6 @@ #include #include #include -#ifdef HAVE_SYS_QUOTA_H -# include -#endif #include #include -- 1.8.3.1