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 <lixi@ddn.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I1ed8014b1050684891df43d4c3db3c2e90b7814c
Reviewed-on: https://review.whamcloud.com/23946
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
#endif /* __KERNEL__ */
#include <lustre/ll_fiemap.h>
+/*
+ * 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__)
#include <dirent.h>
#include <time.h>
#include <ctype.h>
-#ifdef HAVE_SYS_QUOTA_H
-# include <sys/quota.h>
-#endif
#include <libcfs/util/string.h>
#include <libcfs/util/ioctl.h>