On Fri 04-06-10 10:56:01, Christoph Hellwig wrote: > 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. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> Thanks. Merged. Honza > Index: linux-2.6/fs/gfs2/quota.c > =================================================================== > --- linux-2.6.orig/fs/gfs2/quota.c 2010-06-03 08:51:40.563004610 +0200 > +++ linux-2.6/fs/gfs2/quota.c 2010-06-03 08:51:47.924023886 +0200 > @@ -1457,10 +1457,10 @@ static int gfs2_quota_get_xstate(struct > > switch (sdp->sd_args.ar_quota) { > case GFS2_QUOTA_ON: > - fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD); > + fqs->qs_flags |= (FS_QUOTA_UDQ_ENFD | FS_QUOTA_GDQ_ENFD); > /*FALLTHRU*/ > case GFS2_QUOTA_ACCOUNT: > - fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT); > + fqs->qs_flags |= (FS_QUOTA_UDQ_ACCT | FS_QUOTA_GDQ_ACCT); > break; > case GFS2_QUOTA_OFF: > break; > @@ -1506,7 +1506,7 @@ static int gfs2_get_dqblk(struct super_b > > qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lvb; > fdq->d_version = FS_DQUOT_VERSION; > - fdq->d_flags = (type == QUOTA_USER) ? XFS_USER_QUOTA : XFS_GROUP_QUOTA; > + fdq->d_flags = (type == QUOTA_USER) ? FS_USER_QUOTA : FS_GROUP_QUOTA; > fdq->d_id = id; > fdq->d_blk_hardlimit = be64_to_cpu(qlvb->qb_limit); > fdq->d_blk_softlimit = be64_to_cpu(qlvb->qb_warn); > @@ -1541,12 +1541,12 @@ static int gfs2_set_dqblk(struct super_b > switch(type) { > case USRQUOTA: > type = QUOTA_USER; > - if (fdq->d_flags != XFS_USER_QUOTA) > + if (fdq->d_flags != FS_USER_QUOTA) > return -EINVAL; > break; > case GRPQUOTA: > type = QUOTA_GROUP; > - if (fdq->d_flags != XFS_GROUP_QUOTA) > + if (fdq->d_flags != FS_GROUP_QUOTA) > return -EINVAL; > break; > default: > Index: linux-2.6/fs/xfs/linux-2.6/xfs_quotaops.c > =================================================================== > --- linux-2.6.orig/fs/xfs/linux-2.6/xfs_quotaops.c 2010-06-03 08:51:40.573004331 +0200 > +++ linux-2.6/fs/xfs/linux-2.6/xfs_quotaops.c 2010-06-03 08:51:47.924023886 +0200 > @@ -70,15 +70,15 @@ xfs_fs_set_xstate( > if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp)) > return -ENOSYS; > > - if (uflags & XFS_QUOTA_UDQ_ACCT) > + if (uflags & FS_QUOTA_UDQ_ACCT) > flags |= XFS_UQUOTA_ACCT; > - if (uflags & XFS_QUOTA_PDQ_ACCT) > + if (uflags & FS_QUOTA_PDQ_ACCT) > flags |= XFS_PQUOTA_ACCT; > - if (uflags & XFS_QUOTA_GDQ_ACCT) > + if (uflags & FS_QUOTA_GDQ_ACCT) > flags |= XFS_GQUOTA_ACCT; > - if (uflags & XFS_QUOTA_UDQ_ENFD) > + if (uflags & FS_QUOTA_UDQ_ENFD) > flags |= XFS_UQUOTA_ENFD; > - if (uflags & (XFS_QUOTA_PDQ_ENFD|XFS_QUOTA_GDQ_ENFD)) > + if (uflags & (FS_QUOTA_PDQ_ENFD|FS_QUOTA_GDQ_ENFD)) > flags |= XFS_OQUOTA_ENFD; > > switch (op) { > Index: linux-2.6/fs/xfs/quota/xfs_qm_syscalls.c > =================================================================== > --- linux-2.6.orig/fs/xfs/quota/xfs_qm_syscalls.c 2010-06-03 08:51:40.584004261 +0200 > +++ linux-2.6/fs/xfs/quota/xfs_qm_syscalls.c 2010-06-03 08:51:47.929254644 +0200 > @@ -786,9 +786,9 @@ xfs_qm_export_dquot( > } > > #ifdef DEBUG > - if (((XFS_IS_UQUOTA_ENFORCED(mp) && dst->d_flags == XFS_USER_QUOTA) || > + if (((XFS_IS_UQUOTA_ENFORCED(mp) && dst->d_flags == FS_USER_QUOTA) || > (XFS_IS_OQUOTA_ENFORCED(mp) && > - (dst->d_flags & (XFS_PROJ_QUOTA | XFS_GROUP_QUOTA)))) && > + (dst->d_flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)))) && > dst->d_id != 0) { > if (((int) dst->d_bcount >= (int) dst->d_blk_softlimit) && > (dst->d_blk_softlimit > 0)) { > @@ -809,17 +809,17 @@ xfs_qm_export_qtype_flags( > /* > * Can't be more than one, or none. > */ > - ASSERT((flags & (XFS_PROJ_QUOTA | XFS_USER_QUOTA)) != > - (XFS_PROJ_QUOTA | XFS_USER_QUOTA)); > - ASSERT((flags & (XFS_PROJ_QUOTA | XFS_GROUP_QUOTA)) != > - (XFS_PROJ_QUOTA | XFS_GROUP_QUOTA)); > - ASSERT((flags & (XFS_USER_QUOTA | XFS_GROUP_QUOTA)) != > - (XFS_USER_QUOTA | XFS_GROUP_QUOTA)); > - ASSERT((flags & (XFS_PROJ_QUOTA|XFS_USER_QUOTA|XFS_GROUP_QUOTA)) != 0); > + ASSERT((flags & (FS_PROJ_QUOTA | FS_USER_QUOTA)) != > + (FS_PROJ_QUOTA | FS_USER_QUOTA)); > + ASSERT((flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)) != > + (FS_PROJ_QUOTA | FS_GROUP_QUOTA)); > + ASSERT((flags & (FS_USER_QUOTA | FS_GROUP_QUOTA)) != > + (FS_USER_QUOTA | FS_GROUP_QUOTA)); > + ASSERT((flags & (FS_PROJ_QUOTA|FS_USER_QUOTA|FS_GROUP_QUOTA)) != 0); > > return (flags & XFS_DQ_USER) ? > - XFS_USER_QUOTA : (flags & XFS_DQ_PROJ) ? > - XFS_PROJ_QUOTA : XFS_GROUP_QUOTA; > + FS_USER_QUOTA : (flags & XFS_DQ_PROJ) ? > + FS_PROJ_QUOTA : FS_GROUP_QUOTA; > } > > STATIC uint > @@ -830,16 +830,16 @@ xfs_qm_export_flags( > > uflags = 0; > if (flags & XFS_UQUOTA_ACCT) > - uflags |= XFS_QUOTA_UDQ_ACCT; > + uflags |= FS_QUOTA_UDQ_ACCT; > if (flags & XFS_PQUOTA_ACCT) > - uflags |= XFS_QUOTA_PDQ_ACCT; > + uflags |= FS_QUOTA_PDQ_ACCT; > if (flags & XFS_GQUOTA_ACCT) > - uflags |= XFS_QUOTA_GDQ_ACCT; > + uflags |= FS_QUOTA_GDQ_ACCT; > if (flags & XFS_UQUOTA_ENFD) > - uflags |= XFS_QUOTA_UDQ_ENFD; > + uflags |= FS_QUOTA_UDQ_ENFD; > if (flags & (XFS_OQUOTA_ENFD)) { > uflags |= (flags & XFS_GQUOTA_ACCT) ? > - XFS_QUOTA_GDQ_ENFD : XFS_QUOTA_PDQ_ENFD; > + FS_QUOTA_GDQ_ENFD : FS_QUOTA_PDQ_ENFD; > } > return (uflags); > } > Index: linux-2.6/include/linux/dqblk_xfs.h > =================================================================== > --- linux-2.6.orig/include/linux/dqblk_xfs.h 2010-06-03 08:51:40.602004401 +0200 > +++ linux-2.6/include/linux/dqblk_xfs.h 2010-06-03 08:51:47.931297318 +0200 > @@ -49,7 +49,7 @@ > #define FS_DQUOT_VERSION 1 /* fs_disk_quota.d_version */ > typedef struct fs_disk_quota { > __s8 d_version; /* version of this structure */ > - __s8 d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */ > + __s8 d_flags; /* FS_{USER,PROJ,GROUP}_QUOTA */ > __u16 d_fieldmask; /* field specifier */ > __u32 d_id; /* user, project, or group ID */ > __u64 d_blk_hardlimit;/* absolute limit on disk blks */ > @@ -119,18 +119,18 @@ typedef struct fs_disk_quota { > #define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT) > > /* > - * Various flags related to quotactl(2). Only relevant to XFS filesystems. > + * Various flags related to quotactl(2). > */ > -#define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ > -#define XFS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ > -#define XFS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ > -#define XFS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ > -#define XFS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */ > -#define XFS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */ > - > -#define XFS_USER_QUOTA (1<<0) /* user quota type */ > -#define XFS_PROJ_QUOTA (1<<1) /* project quota type */ > -#define XFS_GROUP_QUOTA (1<<2) /* group quota type */ > +#define FS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ > +#define FS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ > +#define FS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ > +#define FS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ > +#define FS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */ > +#define FS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */ > + > +#define FS_USER_QUOTA (1<<0) /* user quota type */ > +#define FS_PROJ_QUOTA (1<<1) /* project quota type */ > +#define FS_GROUP_QUOTA (1<<2) /* group quota type */ > > /* > * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system. > @@ -151,7 +151,7 @@ typedef struct fs_qfilestat { > > typedef struct fs_quota_stat { > __s8 qs_version; /* version number for future changes */ > - __u16 qs_flags; /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ > + __u16 qs_flags; /* FS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */ > __s8 qs_pad; /* unused */ > fs_qfilestat_t qs_uquota; /* user quota storage information */ > fs_qfilestat_t qs_gquota; /* group quota storage information */ > Index: linux-2.6/fs/quota/dquot.c > =================================================================== > --- linux-2.6.orig/fs/quota/dquot.c 2010-06-03 09:07:53.853011524 +0200 > +++ linux-2.6/fs/quota/dquot.c 2010-06-03 09:07:56.901005392 +0200 > @@ -2270,7 +2270,7 @@ static void do_get_dqblk(struct dquot *d > memset(di, 0, sizeof(*di)); > di->d_version = FS_DQUOT_VERSION; > di->d_flags = dquot->dq_type == USRQUOTA ? > - XFS_USER_QUOTA : XFS_GROUP_QUOTA; > + FS_USER_QUOTA : FS_GROUP_QUOTA; > di->d_id = dquot->dq_id; > > spin_lock(&dq_data_lock); -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html