Skip to content
Snippets Groups Projects
Commit aa78c144 authored by Andrew Perepechko's avatar Andrew Perepechko
Browse files

Branch b1_6

b=17302
i=Johann Lombardi
i=ZhiYong Tian

pass QFMT through qc_id to be compatible with older Lustre versions
parent d58b0b01
No related branches found
No related tags found
No related merge requests found
...@@ -270,6 +270,8 @@ struct mds_grp_downcall_data { ...@@ -270,6 +270,8 @@ struct mds_grp_downcall_data {
#endif /* !__KERNEL__ */ #endif /* !__KERNEL__ */
#define QFMT_LDISKFS 2 /* pre-1.6.6 compatibility */
typedef enum lustre_quota_version { typedef enum lustre_quota_version {
LUSTRE_QUOTA_V1 = 0, LUSTRE_QUOTA_V1 = 0,
LUSTRE_QUOTA_V2 = 1 LUSTRE_QUOTA_V2 = 1
......
...@@ -1234,7 +1234,6 @@ static int lfs_quotachown(int argc, char **argv) ...@@ -1234,7 +1234,6 @@ static int lfs_quotachown(int argc, char **argv)
return rc; return rc;
} }
static int lfs_quotacheck(int argc, char **argv) static int lfs_quotacheck(int argc, char **argv)
{ {
int c, check_type = 0; int c, check_type = 0;
...@@ -1275,6 +1274,8 @@ static int lfs_quotacheck(int argc, char **argv) ...@@ -1275,6 +1274,8 @@ static int lfs_quotacheck(int argc, char **argv)
memset(&qctl, 0, sizeof(qctl)); memset(&qctl, 0, sizeof(qctl));
qctl.qc_cmd = LUSTRE_Q_QUOTAOFF; qctl.qc_cmd = LUSTRE_Q_QUOTAOFF;
qctl.qc_type = check_type; 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); rc = llapi_quotactl(mnt, &qctl);
if (rc) { if (rc) {
fprintf(stderr, "quota off failed: %s\n", strerror(errno)); fprintf(stderr, "quota off failed: %s\n", strerror(errno));
...@@ -1299,6 +1300,8 @@ static int lfs_quotacheck(int argc, char **argv) ...@@ -1299,6 +1300,8 @@ static int lfs_quotacheck(int argc, char **argv)
memset(&qctl, 0, sizeof(qctl)); memset(&qctl, 0, sizeof(qctl));
qctl.qc_cmd = LUSTRE_Q_QUOTAON; qctl.qc_cmd = LUSTRE_Q_QUOTAON;
qctl.qc_type = check_type; 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); rc = llapi_quotactl(mnt, &qctl);
if (rc) { if (rc) {
if (*obd_type) if (*obd_type)
...@@ -1322,6 +1325,8 @@ static int lfs_quotaon(int argc, char **argv) ...@@ -1322,6 +1325,8 @@ static int lfs_quotaon(int argc, char **argv)
memset(&qctl, 0, sizeof(qctl)); memset(&qctl, 0, sizeof(qctl));
qctl.qc_cmd = LUSTRE_Q_QUOTAON; qctl.qc_cmd = LUSTRE_Q_QUOTAON;
qctl.qc_id = QFMT_LDISKFS; /* compatibility: 1.6.5 and earliers
* take this parameter into account */
optind = 0; optind = 0;
while ((c = getopt(argc, argv, "ugf")) != -1) { while ((c = getopt(argc, argv, "ugf")) != -1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment