Whamcloud - gitweb
Branch b1_8_gate
authoranserper <anserper>
Wed, 15 Oct 2008 23:37:05 +0000 (23:37 +0000)
committeranserper <anserper>
Wed, 15 Oct 2008 23:37:05 +0000 (23:37 +0000)
b=17302
i=Johann Lombardi
i=ZhiYong Tian

add compatibility for pre-1.6.6 lustre servers

lustre/utils/lfs.c

index 5fffc53..d5d6ee3 100644 (file)
@@ -1307,7 +1307,6 @@ static int lfs_quotachown(int argc, char **argv)
         return rc;
 }
 
-
 static int lfs_quotacheck(int argc, char **argv)
 {
         int c, check_type = 0;
@@ -1348,6 +1347,8 @@ static int lfs_quotacheck(int argc, char **argv)
         memset(&qctl, 0, sizeof(qctl));
         qctl.qc_cmd = LUSTRE_Q_QUOTAOFF;
         qctl.qc_type = check_type;
+        qctl.qc_id = QFMT_LDISKFS; /* compatibility: 1.6.5 and earliers
+                                    * take this parameter into account */
         rc = llapi_quotactl(mnt, &qctl);
         if (rc) {
                 fprintf(stderr, "quota off failed: %s\n", strerror(errno));
@@ -1372,6 +1373,8 @@ static int lfs_quotacheck(int argc, char **argv)
         memset(&qctl, 0, sizeof(qctl));
         qctl.qc_cmd = LUSTRE_Q_QUOTAON;
         qctl.qc_type = check_type;
+        qctl.qc_id = QFMT_LDISKFS; /* compatibility: 1.6.5 and earliers
+                                    * take this parameter into account */
         rc = llapi_quotactl(mnt, &qctl);
         if (rc) {
                 if (*obd_type)
@@ -1395,6 +1398,8 @@ static int lfs_quotaon(int argc, char **argv)
 
         memset(&qctl, 0, sizeof(qctl));
         qctl.qc_cmd = LUSTRE_Q_QUOTAON;
+        qctl.qc_id = QFMT_LDISKFS; /* compatibility: 1.6.5 and earliers
+                                    * take this parameter into account */
 
         optind = 0;
         while ((c = getopt(argc, argv, "ugf")) != -1) {