aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-06-04 04:56:01 -0400
committerJan Kara <jack@suse.cz>2010-07-21 10:01:46 -0400
commitade7ce31c22e961dfbe1a6d57fd362c90c187cbd (patch)
tree96a64a3ae76a182e80db8457e49aa30355b54ae3
parent7af9cce8ae467bb2fcf3b0b6be3898835bdb984c (diff)
quota: Clean up the namespace in dqblk_xfs.h
Almost all identifiers use the FS_* namespace, so rename the missing few XFS_* ones to FS_* as well. Without this some people might get upset about having too many XFS names in generic code. Acked-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/gfs2/quota.c10
-rw-r--r--fs/quota/dquot.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_quotaops.c10
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c32
-rw-r--r--include/linux/dqblk_xfs.h24
5 files changed, 39 insertions, 39 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index b256d6f24288..ce345f8c69c2 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1455,10 +1455,10 @@ static int gfs2_quota_get_xstate(struct super_block *sb,
1455 1455
1456 switch (sdp->sd_args.ar_quota) { 1456 switch (sdp->sd_args.ar_quota) {
1457 case GFS2_QUOTA_ON: 1457 case GFS2_QUOTA_ON:
1458 fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD); 1458 fqs->qs_flags |= (FS_QUOTA_UDQ_ENFD | FS_QUOTA_GDQ_ENFD);
1459 /*FALLTHRU*/ 1459 /*FALLTHRU*/
1460 case GFS2_QUOTA_ACCOUNT: 1460 case GFS2_QUOTA_ACCOUNT:
1461 fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT); 1461 fqs->qs_flags |= (FS_QUOTA_UDQ_ACCT | FS_QUOTA_GDQ_ACCT);
1462 break; 1462 break;
1463 case GFS2_QUOTA_OFF: 1463 case GFS2_QUOTA_OFF:
1464 break; 1464 break;
@@ -1504,7 +1504,7 @@ static int gfs2_get_dqblk(struct super_block *sb, int type, qid_t id,
1504 1504
1505 qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lvb; 1505 qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lvb;
1506 fdq->d_version = FS_DQUOT_VERSION; 1506 fdq->d_version = FS_DQUOT_VERSION;
1507 fdq->d_flags = (type == QUOTA_USER) ? XFS_USER_QUOTA : XFS_GROUP_QUOTA; 1507 fdq->d_flags = (type == QUOTA_USER) ? FS_USER_QUOTA : FS_GROUP_QUOTA;
1508 fdq->d_id = id; 1508 fdq->d_id = id;
1509 fdq->d_blk_hardlimit = be64_to_cpu(qlvb->qb_limit); 1509 fdq->d_blk_hardlimit = be64_to_cpu(qlvb->qb_limit);
1510 fdq->d_blk_softlimit = be64_to_cpu(qlvb->qb_warn); 1510 fdq->d_blk_softlimit = be64_to_cpu(qlvb->qb_warn);
@@ -1539,12 +1539,12 @@ static int gfs2_set_dqblk(struct super_block *sb, int type, qid_t id,
1539 switch(type) { 1539 switch(type) {
1540 case USRQUOTA: 1540 case USRQUOTA:
1541 type = QUOTA_USER; 1541 type = QUOTA_USER;
1542 if (fdq->d_flags != XFS_USER_QUOTA) 1542 if (fdq->d_flags != FS_USER_QUOTA)
1543 return -EINVAL; 1543 return -EINVAL;
1544 break; 1544 break;
1545 case GRPQUOTA: 1545 case GRPQUOTA:
1546 type = QUOTA_GROUP; 1546 type = QUOTA_GROUP;
1547 if (fdq->d_flags != XFS_GROUP_QUOTA) 1547 if (fdq->d_flags != FS_GROUP_QUOTA)
1548 return -EINVAL; 1548 return -EINVAL;
1549 break; 1549 break;
1550 default: 1550 default:
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index a5974c49a78b..2857fd67ff33 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2281,7 +2281,7 @@ static void do_get_dqblk(struct dquot *dquot, struct fs_disk_quota *di)
2281 memset(di, 0, sizeof(*di)); 2281 memset(di, 0, sizeof(*di));
2282 di->d_version = FS_DQUOT_VERSION; 2282 di->d_version = FS_DQUOT_VERSION;
2283 di->d_flags = dquot->dq_type == USRQUOTA ? 2283 di->d_flags = dquot->dq_type == USRQUOTA ?
2284 XFS_USER_QUOTA : XFS_GROUP_QUOTA; 2284 FS_USER_QUOTA : FS_GROUP_QUOTA;
2285 di->d_id = dquot->dq_id; 2285 di->d_id = dquot->dq_id;
2286 2286
2287 spin_lock(&dq_data_lock); 2287 spin_lock(&dq_data_lock);
diff --git a/fs/xfs/linux-2.6/xfs_quotaops.c b/fs/xfs/linux-2.6/xfs_quotaops.c
index 067cafbfc635..b9ba7536f4b4 100644
--- a/fs/xfs/linux-2.6/xfs_quotaops.c
+++ b/fs/xfs/linux-2.6/xfs_quotaops.c
@@ -69,15 +69,15 @@ xfs_fs_set_xstate(
69 if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp)) 69 if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp))
70 return -ENOSYS; 70 return -ENOSYS;
71 71
72 if (uflags & XFS_QUOTA_UDQ_ACCT) 72 if (uflags & FS_QUOTA_UDQ_ACCT)
73 flags |= XFS_UQUOTA_ACCT; 73 flags |= XFS_UQUOTA_ACCT;
74 if (uflags & XFS_QUOTA_PDQ_ACCT) 74 if (uflags & FS_QUOTA_PDQ_ACCT)
75 flags |= XFS_PQUOTA_ACCT; 75 flags |= XFS_PQUOTA_ACCT;
76 if (uflags & XFS_QUOTA_GDQ_ACCT) 76 if (uflags & FS_QUOTA_GDQ_ACCT)
77 flags |= XFS_GQUOTA_ACCT; 77 flags |= XFS_GQUOTA_ACCT;
78 if (uflags & XFS_QUOTA_UDQ_ENFD) 78 if (uflags & FS_QUOTA_UDQ_ENFD)
79 flags |= XFS_UQUOTA_ENFD; 79 flags |= XFS_UQUOTA_ENFD;
80 if (uflags & (XFS_QUOTA_PDQ_ENFD|XFS_QUOTA_GDQ_ENFD)) 80 if (uflags & (FS_QUOTA_PDQ_ENFD|FS_QUOTA_GDQ_ENFD))
81 flags |= XFS_OQUOTA_ENFD; 81 flags |= XFS_OQUOTA_ENFD;
82 82
83 switch (op) { 83 switch (op) {
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index b4487764e923..41b04b96975b 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -786,9 +786,9 @@ xfs_qm_export_dquot(
786 } 786 }
787 787
788#ifdef DEBUG 788#ifdef DEBUG
789 if (((XFS_IS_UQUOTA_ENFORCED(mp) && dst->d_flags == XFS_USER_QUOTA) || 789 if (((XFS_IS_UQUOTA_ENFORCED(mp) && dst->d_flags == FS_USER_QUOTA) ||
790 (XFS_IS_OQUOTA_ENFORCED(mp) && 790 (XFS_IS_OQUOTA_ENFORCED(mp) &&
791 (dst->d_flags & (XFS_PROJ_QUOTA | XFS_GROUP_QUOTA)))) && 791 (dst->d_flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)))) &&
792 dst->d_id != 0) { 792 dst->d_id != 0) {
793 if (((int) dst->d_bcount >= (int) dst->d_blk_softlimit) && 793 if (((int) dst->d_bcount >= (int) dst->d_blk_softlimit) &&
794 (dst->d_blk_softlimit > 0)) { 794 (dst->d_blk_softlimit > 0)) {
@@ -809,17 +809,17 @@ xfs_qm_export_qtype_flags(
809 /* 809 /*
810 * Can't be more than one, or none. 810 * Can't be more than one, or none.
811 */ 811 */
812 ASSERT((flags & (XFS_PROJ_QUOTA | XFS_USER_QUOTA)) != 812 ASSERT((flags & (FS_PROJ_QUOTA | FS_USER_QUOTA)) !=
813 (XFS_PROJ_QUOTA | XFS_USER_QUOTA)); 813 (FS_PROJ_QUOTA | FS_USER_QUOTA));
814 ASSERT((flags & (XFS_PROJ_QUOTA | XFS_GROUP_QUOTA)) != 814 ASSERT((flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)) !=
815 (XFS_PROJ_QUOTA | XFS_GROUP_QUOTA)); 815 (FS_PROJ_QUOTA | FS_GROUP_QUOTA));
816 ASSERT((flags & (XFS_USER_QUOTA | XFS_GROUP_QUOTA)) != 816 ASSERT((flags & (FS_USER_QUOTA | FS_GROUP_QUOTA)) !=
817 (XFS_USER_QUOTA | XFS_GROUP_QUOTA)); 817 (FS_USER_QUOTA | FS_GROUP_QUOTA));
818 ASSERT((flags & (XFS_PROJ_QUOTA|XFS_USER_QUOTA|XFS_GROUP_QUOTA)) != 0); 818 ASSERT((flags & (FS_PROJ_QUOTA|FS_USER_QUOTA|FS_GROUP_QUOTA)) != 0);
819 819
820 return (flags & XFS_DQ_USER) ? 820 return (flags & XFS_DQ_USER) ?
821 XFS_USER_QUOTA : (flags & XFS_DQ_PROJ) ? 821 FS_USER_QUOTA : (flags & XFS_DQ_PROJ) ?
822 XFS_PROJ_QUOTA : XFS_GROUP_QUOTA; 822 FS_PROJ_QUOTA : FS_GROUP_QUOTA;
823} 823}
824 824
825STATIC uint 825STATIC uint
@@ -830,16 +830,16 @@ xfs_qm_export_flags(
830 830
831 uflags = 0; 831 uflags = 0;
832 if (flags & XFS_UQUOTA_ACCT) 832 if (flags & XFS_UQUOTA_ACCT)
833 uflags |= XFS_QUOTA_UDQ_ACCT; 833 uflags |= FS_QUOTA_UDQ_ACCT;
834 if (flags & XFS_PQUOTA_ACCT) 834 if (flags & XFS_PQUOTA_ACCT)
835 uflags |= XFS_QUOTA_PDQ_ACCT; 835 uflags |= FS_QUOTA_PDQ_ACCT;
836 if (flags & XFS_GQUOTA_ACCT) 836 if (flags & XFS_GQUOTA_ACCT)
837 uflags |= XFS_QUOTA_GDQ_ACCT; 837 uflags |= FS_QUOTA_GDQ_ACCT;
838 if (flags & XFS_UQUOTA_ENFD) 838 if (flags & XFS_UQUOTA_ENFD)
839 uflags |= XFS_QUOTA_UDQ_ENFD; 839 uflags |= FS_QUOTA_UDQ_ENFD;
840 if (flags & (XFS_OQUOTA_ENFD)) { 840 if (flags & (XFS_OQUOTA_ENFD)) {
841 uflags |= (flags & XFS_GQUOTA_ACCT) ? 841 uflags |= (flags & XFS_GQUOTA_ACCT) ?
842 XFS_QUOTA_GDQ_ENFD : XFS_QUOTA_PDQ_ENFD; 842 FS_QUOTA_GDQ_ENFD : FS_QUOTA_PDQ_ENFD;
843 } 843 }
844 return (uflags); 844 return (uflags);
845} 845}
diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h
index 4389ae72024e..86552807aed9 100644
--- a/include/linux/dqblk_xfs.h
+++ b/include/linux/dqblk_xfs.h
@@ -49,7 +49,7 @@
49#define FS_DQUOT_VERSION 1 /* fs_disk_quota.d_version */ 49#define FS_DQUOT_VERSION 1 /* fs_disk_quota.d_version */
50typedef struct fs_disk_quota { 50typedef struct fs_disk_quota {
51 __s8 d_version; /* version of this structure */ 51 __s8 d_version; /* version of this structure */
52 __s8 d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */ 52 __s8 d_flags; /* FS_{USER,PROJ,GROUP}_QUOTA */
53 __u16 d_fieldmask; /* field specifier */ 53 __u16 d_fieldmask; /* field specifier */
54 __u32 d_id; /* user, project, or group ID */ 54 __u32 d_id; /* user, project, or group ID */
55 __u64 d_blk_hardlimit;/* absolute limit on disk blks */ 55 __u64 d_blk_hardlimit;/* absolute limit on disk blks */
@@ -119,18 +119,18 @@ typedef struct fs_disk_quota {
119#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT) 119#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
120 120
121/* 121/*
122 * Various flags related to quotactl(2). Only relevant to XFS filesystems. 122 * Various flags related to quotactl(2).
123 */ 123 */
124#define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ 124#define FS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */
125#define XFS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ 125#define FS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */
126#define XFS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ 126#define FS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */
127#define XFS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ 127#define FS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */
128#define XFS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */ 128#define FS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */
129#define XFS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */ 129#define FS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */
130 130
131#define XFS_USER_QUOTA (1<<0) /* user quota type */ 131#define FS_USER_QUOTA (1<<0) /* user quota type */
132#define XFS_PROJ_QUOTA (1<<1) /* project quota type */ 132#define FS_PROJ_QUOTA (1<<1) /* project quota type */
133#define XFS_GROUP_QUOTA (1<<2) /* group quota type */ 133#define FS_GROUP_QUOTA (1<<2) /* group quota type */
134 134
135/* 135/*
136 * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system. 136 * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system.
@@ -151,7 +151,7 @@ typedef struct fs_qfilestat {
151 151
152typedef struct fs_quota_stat { 152typedef struct fs_quota_stat {
153 __s8 qs_version; /* version number for future changes */ 153 __s8 qs_version; /* version number for future changes */
154 __u16 qs_flags; /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ 154 __u16 qs_flags; /* FS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */
155 __s8 qs_pad; /* unused */ 155 __s8 qs_pad; /* unused */
156 fs_qfilestat_t qs_uquota; /* user quota storage information */ 156 fs_qfilestat_t qs_uquota; /* user quota storage information */
157 fs_qfilestat_t qs_gquota; /* group quota storage information */ 157 fs_qfilestat_t qs_gquota; /* group quota storage information */