Whamcloud - gitweb
Disable compile userspace quota stuff for b1_4. This is short-term solution
authorniu <niu>
Fri, 21 Oct 2005 08:33:59 +0000 (08:33 +0000)
committerniu <niu>
Fri, 21 Oct 2005 08:33:59 +0000 (08:33 +0000)
for the <linux/quota.h> problem before b1_4_quota lands.
-b 9542
-r adilger

lustre/include/lustre/lustre_user.h
lustre/llite/dir.c
lustre/utils/lfs.c
lustre/utils/liblustreapi.c

index 6446634..8aa9939 100644 (file)
@@ -15,7 +15,7 @@
 #include <lustre/types.h>
 #endif
 
-#ifdef HAVE_LINUX_QUOTA_H
+#ifdef HAVE_QUOTA_SUPPORT
 #include <linux/quota.h>
 #endif
 
@@ -160,6 +160,7 @@ struct mds_grp_downcall_data {
         __u32           mgd_groups[0];
 };
 
+
 #ifndef __KERNEL__
 #define NEED_QUOTA_DEFS
 #else
@@ -169,6 +170,8 @@ struct mds_grp_downcall_data {
 # endif
 #endif
 
+#ifdef HAVE_QUOTA_SUPPORT
+
 #ifdef NEED_QUOTA_DEFS
 #ifndef QUOTABLOCK_BITS
 #define QUOTABLOCK_BITS 10
@@ -219,7 +222,7 @@ struct if_dqblk {
 #define QIF_ALL         (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
 #endif
 
-#endif /* !__KERNEL__ */
+#endif /* NEED_QUOTA_DEFS */
 
 struct if_quotactl {
         int                     qc_cmd;
@@ -232,6 +235,13 @@ struct if_quotactl {
         struct obd_uuid         obd_uuid;
 };
 
+#else
+
+struct if_quotactl {
+};
+
+#endif /* HAVE_QUOTA_SUPPORT */
+
 #ifndef LPU64
 /* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
 #if defined(__x86_64__) && defined(__KERNEL__)
index 68196c3..cade821 100644 (file)
@@ -724,6 +724,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
                  
                 RETURN(0);
         }
+#if HAVE_QUOTA_SUPPORT
         case OBD_IOC_QUOTACTL: {
                 struct if_quotactl qctl;
                 struct obd_quotactl oqctl;
@@ -834,6 +835,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file,
 
                 RETURN(rc?:error);
         }
+#endif /* HAVE_QUOTA_SUPPORT */
         case OBD_IOC_GETNAME: {  
                 struct obd_device *obd = class_exp2obd(sbi->ll_osc_exp);
                 if (!obd)
index 8c88b1a..ae1332c 100644 (file)
 #include "parser.h"
 #include "obdctl.h"
 
+unsigned int libcfs_subsystem_debug = 0;
+
+#ifdef HAVE_QUOTA_SUPPORT
+
 /* FIXME: Q_SYNC ... commands defined in linux/quota.h seems broken,
  *        so define new commands with the value in kernel */
 #define LUSTRE_Q_QUOTAON  0x800002     /* turn quotas on */
@@ -59,7 +63,7 @@
 # define GRPQUOTA 1
 #endif
 
-unsigned int libcfs_subsystem_debug = 0;
+#endif /* HAVE_QUOTA_SUPPORT */
 
 /* all functions */
 static int lfs_setstripe(int argc, char **argv);
@@ -68,12 +72,14 @@ static int lfs_getstripe(int argc, char **argv);
 static int lfs_osts(int argc, char **argv);
 static int lfs_check(int argc, char **argv);
 static int lfs_catinfo(int argc, char **argv);
+#ifdef HAVE_QUOTA_SUPPORT
 static int lfs_quotachog(int argc, char **argv);
 static int lfs_quotacheck(int argc, char **argv);
 static int lfs_quotaon(int argc, char **argv);
 static int lfs_quotaoff(int argc, char **argv);
 static int lfs_setquota(int argc, char **argv);
 static int lfs_quota(int argc, char **argv);
+#endif
 
 /* all avaialable commands */
 command_t cmdlist[] = {
@@ -104,6 +110,7 @@ command_t cmdlist[] = {
          "\tkeywords are one of followings: config, deletions.\n"
          "\tnode name must be provided when use keyword config."},
         {"osts", lfs_osts, 0, "osts"},
+#ifdef HAVE_QUOTA_SUPPORT
         {"quotachog",lfs_quotachog, 0,
          "Change all files owner or group in specified filesystem.\n"
          "usage: quotachog [-i] <filesystem>\n"
@@ -122,6 +129,7 @@ command_t cmdlist[] = {
         {"quota", lfs_quota, 0, "Display disk usage and limits.\n"
          "usage: quota -t [ -u |-g ] <filesystem>\n"
          "       quota [ -o obd_uuid ] [ -u | -g ] [name] <filesystem>"},
+#endif
         {"help", Parser_help, 0, "help"},
         {"exit", Parser_quit, 0, "quit"},
         {"quit", Parser_quit, 0, "quit"},
@@ -429,7 +437,7 @@ static int lfs_catinfo(int argc, char **argv)
         return rc;
 }
 
-
+#ifdef HAVE_QUOTA_SUPPORT
 static int lfs_quotachog(int argc, char **argv)
 {
 
@@ -953,6 +961,7 @@ static int lfs_quota(int argc, char **argv)
         print_quota(mnt, name, &qctl);
         return 0;
 }
+#endif /* HAVE_QUOTA_SUPPORT */
 
 int main(int argc, char **argv)
 {
index 9825387..67fc615 100644 (file)
@@ -866,4 +866,3 @@ out:
         cleanup_find(&param);
         return ret;
 }
-