]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
move to version 1.2.0 for group quota changes. v1.2.0
authorNathan Scott <nathans@sgi.com>
Tue, 3 Apr 2001 02:52:38 +0000 (02:52 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 3 Apr 2001 02:52:38 +0000 (02:52 +0000)
31 files changed:
VERSION
db/check.c
db/dquot.c
db/frag.c
db/inode.c
db/sb.c
debian/changelog
doc/CHANGES
doc/README.quota
include/xfs_buf_item.h
include/xfs_dqblk.h
include/xfs_dquot_item.h
include/xfs_inode.h
include/xfs_quota.h
include/xfs_sb.h
include/xqm.h
libxfs/xfs_bmap.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_mount.c
logprint/log_print_all.c
mkfs/xfs_mkfs.c
repair/agheader.c
repair/dinode.c
repair/dir.c
repair/dir2.c
repair/globals.h
repair/phase4.c
repair/phase6.c
repair/sb.c
repair/versions.c
repair/xfs_repair.c

diff --git a/VERSION b/VERSION
index 914aa3026e8acc5e8617b6057f08baa13b610bd1..bfa363efcff2adeaa4a0fee515308a8a223e3b66 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,6 +2,6 @@
 # This file is used by configure to get version information
 #
 PKG_MAJOR=1
-PKG_MINOR=1
-PKG_REVISION=9
+PKG_MINOR=2
+PKG_REVISION=0
 PKG_BUILD=0
index b40442206f5cbd8440ebb97a1fa59a4f6dd0b7f1..8bfc99e6cc1d8ab480a3998c400d0c9779adcfdd 100644 (file)
@@ -134,8 +134,8 @@ static int          inodata_hash_size;
 static inodata_t       ***inomap;
 static int             nflag;
 static int             pflag;
-static qdata_t         **qpdata;
-static int             qpdo;
+static qdata_t         **qgdata;
+static int             qgdo;
 static qdata_t         **qudata;
 static int             qudo;
 static unsigned                sbversion;
@@ -316,7 +316,7 @@ static void         process_leaf_node_dir_v2_int(inodata_t *id, int v,
                                                     freetab_t *freetab);
 static xfs_ino_t       process_node_dir_v1(blkmap_t *blkmap, int *dot,
                                            int *dotdot, inodata_t *id);
-static void            process_quota(int isproj, inodata_t *id,
+static void            process_quota(int isgrp, inodata_t *id,
                                      blkmap_t *blkmap);
 static void            process_rtbitmap(blkmap_t *blkmap);
 static void            process_rtsummary(blkmap_t *blkmap);
@@ -324,7 +324,7 @@ static xfs_ino_t    process_sf_dir_v2(xfs_dinode_t *dip, int *dot,
                                          int *dotdot, inodata_t *id);
 static xfs_ino_t       process_shortform_dir_v1(xfs_dinode_t *dip, int *dot,
                                                 int *dotdot, inodata_t *id);
-static void            quota_add(xfs_dqid_t projid, xfs_dqid_t userid,
+static void            quota_add(xfs_dqid_t grpid, xfs_dqid_t usrid,
                                  int dq, xfs_qcnt_t bc, xfs_qcnt_t ic,
                                  xfs_qcnt_t rc);
 static void            quota_add1(qdata_t **qt, xfs_dqid_t id, int dq,
@@ -897,8 +897,8 @@ blockget_f(
        }
        if (qudo)
                quota_check("user", qudata);
-       if (qpdo)
-               quota_check("project", qpdata);
+       if (qgdo)
+               quota_check("group", qgdata);
        if (sbver_err > mp->m_sb.sb_agcount / 2)
                dbprintf("WARNING: this may be a newer XFS filesystem.\n");
        if (error)
@@ -1778,7 +1778,7 @@ init(
        if (mp->m_sb.sb_inoalignmt)
                sbversion |= XFS_SB_VERSION_ALIGNBIT;
        if ((mp->m_sb.sb_uquotino && mp->m_sb.sb_uquotino != NULLFSINO) ||
-           (mp->m_sb.sb_pquotino && mp->m_sb.sb_pquotino != NULLFSINO))
+           (mp->m_sb.sb_gquotino && mp->m_sb.sb_gquotino != NULLFSINO))
                sbversion |= XFS_SB_VERSION_QUOTABIT;
        quota_init();
        return 1;
@@ -2705,7 +2705,7 @@ process_inode(
                        addlink_inode(id);
                }
                else if (id->ino == mp->m_sb.sb_uquotino ||
-                        id->ino == mp->m_sb.sb_pquotino) {
+                        id->ino == mp->m_sb.sb_gquotino) {
                        type = DBM_QUOTA;
                        blkmap = blkmap_alloc(dic->di_nextents);
                        addlink_inode(id);
@@ -2760,7 +2760,7 @@ process_inode(
                        break;
                }
        }
-       if (qpdo || qudo) {
+       if (qgdo || qudo) {
                switch (type) {
                case DBM_DATA:
                case DBM_DIR:
@@ -2815,8 +2815,16 @@ process_inode(
         * If the CHKD flag is not set, this can legitimately contain garbage;
         * xfs_repair may have cleared that bit.
         */
-       else if (type == DBM_QUOTA && (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD))
-               process_quota(id->ino == mp->m_sb.sb_pquotino, id, blkmap);
+       else if (type == DBM_QUOTA) {
+               if (id->ino == mp->m_sb.sb_uquotino &&
+                   (mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) &&
+                   (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD))
+                       process_quota(0, id, blkmap);
+               else if (id->ino == mp->m_sb.sb_gquotino &&
+                        (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) &&
+                        (mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD))
+                       process_quota(1, id, blkmap);
+       }
        if (blkmap)
                blkmap_free(blkmap);
 }
@@ -3311,7 +3319,7 @@ process_node_dir_v1(
 
 static void
 process_quota(
-       int             isproj,
+       int             isgrp,
        inodata_t       *id,
        blkmap_t        *blkmap)
 {
@@ -3328,8 +3336,8 @@ process_quota(
        int             t;
 
        perblock = (int)(mp->m_sb.sb_blocksize / sizeof(*dqb));
-       s = isproj ? "project" : "user";
-       exp_flags = isproj ? XFS_DQ_PROJ : XFS_DQ_USER;
+       s = isgrp ? "group" : "user";
+       exp_flags = isgrp ? XFS_DQ_GROUP : XFS_DQ_USER;
        dqid = 0;
        qbno = NULLFILEOFF;
        while ((qbno = blkmap_next_off(blkmap, qbno, &t)) !=
@@ -3396,7 +3404,7 @@ process_quota(
                                error++;
                                continue;
                        }
-                       quota_add(isproj ? dqid : -1, isproj ? -1 : dqid, 1,
+                       quota_add(isgrp ? dqid : -1, isgrp ? -1 : dqid, 1,
                                  INT_GET(dqb->dd_diskdq.d_bcount, ARCH_CONVERT),
                                  INT_GET(dqb->dd_diskdq.d_icount, ARCH_CONVERT),
                                  INT_GET(dqb->dd_diskdq.d_rtbcount, ARCH_CONVERT));
@@ -3693,17 +3701,17 @@ process_shortform_dir_v1(
 
 static void
 quota_add(
-       xfs_dqid_t      projid,
-       xfs_dqid_t      userid,
+       xfs_dqid_t      grpid,
+       xfs_dqid_t      usrid,
        int             dq,
        xfs_qcnt_t      bc,
        xfs_qcnt_t      ic,
        xfs_qcnt_t      rc)
 {
-       if (qudo && userid != -1)
-               quota_add1(qudata, userid, dq, bc, ic, rc);
-       if (qpdo && projid != -1)
-               quota_add1(qpdata, projid, dq, bc, ic, rc);
+       if (qudo && usrid != -1)
+               quota_add1(qudata, usrid, dq, bc, ic, rc);
+       if (qgdo && grpid != -1)
+               quota_add1(qgdata, grpid, dq, bc, ic, rc);
 }
 
 static void
@@ -3790,14 +3798,16 @@ quota_init(void)
 {
        qudo = mp->m_sb.sb_uquotino != 0 &&
               mp->m_sb.sb_uquotino != NULLFSINO &&
+              (mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT) &&
               (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD);
-       qpdo = mp->m_sb.sb_pquotino != 0 &&
-              mp->m_sb.sb_pquotino != NULLFSINO &&
-              (mp->m_sb.sb_qflags & XFS_PQUOTA_CHKD);
+       qgdo = mp->m_sb.sb_gquotino != 0 &&
+              mp->m_sb.sb_gquotino != NULLFSINO &&
+              (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) &&
+              (mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD);
        if (qudo)
                qudata = xcalloc(QDATA_HASH_SIZE, sizeof(qdata_t *));
-       if (qpdo)
-               qpdata = xcalloc(QDATA_HASH_SIZE, sizeof(qdata_t *));
+       if (qgdo)
+               qgdata = xcalloc(QDATA_HASH_SIZE, sizeof(qdata_t *));
 }
 
 static void
index be22d81e1bc7cf73d57c14768902b87166f38a4a..dc845381c547a43baa97dab6f98a4fc6b5c927a7 100644 (file)
@@ -50,8 +50,8 @@ static int    dquot_f(int argc, char **argv);
 static void    dquot_help(void);
 
 static const cmdinfo_t dquot_cmd =
-       { "dquot", NULL, dquot_f, 1, 2, 1, "[project|user id]",
-         "set current address to project or user quota block", dquot_help };
+       { "dquot", NULL, dquot_f, 1, 2, 1, "[gid|uid]",
+         "set current address to group or user quota block", dquot_help };
 
 const field_t  dqblk_hfld[] = {
        { "", FLDT_DQBLK, OI(0), C1, 0, TYP_NONE },
@@ -111,7 +111,7 @@ dquot_f(
 {
        bmap_ext_t      bm;
        int             c;
-       int             doproj;
+       int             dogrp;
        xfs_dqid_t      id;
        xfs_ino_t       ino;
        int             nex;
@@ -121,26 +121,26 @@ dquot_f(
        int             qoff;
        char            *s;
 
-       doproj = optind = 0;
-       while ((c = getopt(argc, argv, "pu")) != EOF) {
+       dogrp = optind = 0;
+       while ((c = getopt(argc, argv, "gu")) != EOF) {
                switch (c) {
-               case 'p':
-                       doproj = 1;
+               case 'g':
+                       dogrp = 1;
                        break;
                case 'u':
-                       doproj = 0;
+                       dogrp = 0;
                        break;
                default:
                        dbprintf("bad option for dquot command\n");
                        return 0;
                }
        }
-       s = doproj ? "project" : "user";
+       s = dogrp ? "group" : "user";
        if (optind != argc - 1) {
                dbprintf("dquot command requires one %s id argument\n", s);
                return 0;
        }
-       ino = doproj ? mp->m_sb.sb_pquotino : mp->m_sb.sb_uquotino;
+       ino = dogrp ? mp->m_sb.sb_gquotino : mp->m_sb.sb_uquotino;
        if (ino == 0 || ino == NULLFSINO) {
                dbprintf("no %s quota inode present\n", s);
                return 0;
index 100d11aa86b83ef077abd7d4951fe0bcbd3415f0..59991f62700f0f138f989c289ae5f97ececcd49c 100644 (file)
--- a/db/frag.c
+++ b/db/frag.c
@@ -352,7 +352,7 @@ process_inode(
                        skipd = 1;
                else if (!qflag &&
                         (ino == mp->m_sb.sb_uquotino ||
-                         ino == mp->m_sb.sb_pquotino))
+                         ino == mp->m_sb.sb_gquotino))
                        skipd = 1;
                else
                        skipd = !fflag;
index a12e32fe35edd22ace36c148fbb83aaa6afc284b..3b6c3df2ac80d88b3c20bec54c9154684c15355f 100644 (file)
@@ -386,7 +386,7 @@ inode_next_type(void)
                else if (iocur_top->ino == mp->m_sb.sb_rsumino)
                        return TYP_RTSUMMARY;
                else if (iocur_top->ino == mp->m_sb.sb_uquotino ||
-                        iocur_top->ino == mp->m_sb.sb_pquotino)
+                        iocur_top->ino == mp->m_sb.sb_gquotino)
                        return TYP_DQBLK;
                else
                        return TYP_DATA;
diff --git a/db/sb.c b/db/sb.c
index dc40b7dd529b07e80e4fcbc113a664cceb7ccffa..8bdaf60c45c4b73657ae221af7538c8a1419c80d 100644 (file)
--- a/db/sb.c
+++ b/db/sb.c
@@ -91,7 +91,7 @@ const field_t sb_flds[] = {
        { "fdblocks", FLDT_UINT64D, OI(OFF(fdblocks)), C1, 0, TYP_NONE },
        { "frextents", FLDT_UINT64D, OI(OFF(frextents)), C1, 0, TYP_NONE },
        { "uquotino", FLDT_INO, OI(OFF(uquotino)), C1, 0, TYP_INODE },
-       { "pquotino", FLDT_INO, OI(OFF(pquotino)), C1, 0, TYP_INODE },
+       { "gquotino", FLDT_INO, OI(OFF(gquotino)), C1, 0, TYP_INODE },
        { "qflags", FLDT_UINT16X, OI(OFF(qflags)), C1, 0, TYP_NONE },
        { "flags", FLDT_UINT8X, OI(OFF(flags)), C1, 0, TYP_NONE },
        { "shared_vn", FLDT_UINT8D, OI(OFF(shared_vn)), C1, 0, TYP_NONE },
index 375a932fe0f2cd22a0df6e5078e8dbb684a2fcdc..c0a161ac43c46cee475ff9bde00d778bd0915667 100644 (file)
@@ -1,3 +1,11 @@
+xfsprogs (1.2.0) unstable; urgency=low
+
+  * Support for group quota added
+  * Stripe unit/stripe width extraction for MD devices
+  * Added mkfs.xfs heuristics for size of internal log
+
+ -- Nathan Scott <nathans@debian.org>  Sun,  1 Apr 2001 16:49:26 +1000
+
 xfsprogs (1.1.6) unstable; urgency=low
 
   * Fix sparc build failure - fcntl.h missing O_DIRECT (closes: #90211)
index 2c3acd2110c444233b30ab844a4a6253e6aa038c..a55524cffe67482c792bb7b73eb271275b91dfa8 100644 (file)
@@ -1,5 +1,10 @@
+xfsprogs-1.2.0 (1 April 2001)
+       - support for group quota added
+       - some headers updated, in particular <xqm.h>
+       - now in late stages of beta
+
 xfsprogs-1.1.9 (26 March 2001)
-       - Added automagic stripe unit/stripe width extraction for MD devices
+       - added automagic stripe unit/stripe width extraction for MD devices
 
 xfsprogs-1.1.8 (23 March 2001)
        - mkfs heuristics to make a qualified guess of internal logsize
index da0fa4a97085f9cbe93b184b456be8abdd681a11..c563002f0f5dac0a82827f5c208063dd69cadc29 100644 (file)
@@ -278,9 +278,6 @@ Disk quotas for user nathans (uid 16302):
 
 CAVEATS
 
-Group quota are not implemented in the first Linux/XFS release, but are
-pencilled in for the next release.
-
 The XFS allocation mechanism will always reserve the maximum amount of
 space required before proceeding with a space allocation.  If insufficient
 space for this reservation is available, due to the users block quota limit
@@ -294,7 +291,7 @@ limits.  This additional overhead is typically in the range of tens of
 filesystem-sized blocks.
 
 On IRIX, XFS supports project quota.  This is not (ever) likely to be
-supported on Linux/XFS, as the concept of a project is peculiar to IRIX.
+supported on Linux/XFS, as the concept of a project is specific to IRIX.
 A filesystem that has used user quota on IRIX, however, can be migrated
 to Linux, and vice-versa, as the ondisk format is shared between both
 versions of XFS (and Linux/XFS is "endian clean").
index 5d097f8e3928cc9c58e89b023177625e1cad04bb..15ad26a8617dddac09c49c47061afdd7cffea1a1 100644 (file)
@@ -77,10 +77,11 @@ typedef struct xfs_buf_log_format_t {
 #define        XFS_BLI_CANCEL          0x2
 /*
  * This flag indicates that the buffer contains on disk 
- * user or projectdquots and may require special recovery handling.   
+ * user or group dquots and may require special recovery handling.   
  */
 #define        XFS_BLI_UDQUOT_BUF      0x4
-#define        XFS_BLI_PDQUOT_BUF      0x8
+/* #define XFS_BLI_PDQUOT_BUF  0x8 */
+#define        XFS_BLI_GDQUOT_BUF      0x10
 
 #define        XFS_BLI_CHUNK           128
 #define        XFS_BLI_SHIFT           7
index ec1704d86f97f26215c18a355822cf76413081fe..145770c533d5b10491595b9e475f4e0cbb39276e 100644 (file)
@@ -47,8 +47,8 @@
 typedef struct xfs_disk_dquot {
 /*16*/ u_int16_t       d_magic;        /* dquot magic = XFS_DQUOT_MAGIC */
 /*8 */ u_int8_t        d_version;      /* dquot version */
-/*8 */ u_int8_t        d_flags;        /* XFS_DQ_USER/DQ_PROJ */
-/*32*/ xfs_dqid_t      d_id;           /* user id or proj id */
+/*8 */ u_int8_t        d_flags;        /* XFS_DQ_USER/PROJ/GROUP */
+/*32*/ xfs_dqid_t      d_id;           /* user,project,group id */
 /*64*/ xfs_qcnt_t      d_blk_hardlimit;/* absolute limit on disk blks */
 /*64*/ xfs_qcnt_t      d_blk_softlimit;/* preferred limit on disk blks */
 /*64*/ xfs_qcnt_t      d_ino_hardlimit;/* maximum # allocated inodes */
@@ -82,8 +82,8 @@ typedef struct xfs_dqblk {
  * flags for q_flags field in the dquot.
  */
 #define XFS_DQ_USER            0x0001          /* a user quota */
-#define XFS_DQ_PROJ            0x0002          /* a project quota */
-
+/* #define XFS_DQ_PROJ         0x0002          -- project quota (IRIX) */
+#define XFS_DQ_GROUP           0x0004          /* a group quota */
 #define XFS_DQ_FLOCKED         0x0008          /* flush lock taken */
 #define XFS_DQ_DIRTY           0x0010          /* dquot is dirty */
 #define XFS_DQ_WANT            0x0020          /* for lookup/reclaim race */
@@ -91,7 +91,7 @@ typedef struct xfs_dqblk {
 #define XFS_DQ_MARKER          0x0080          /* sentinel */
 
 /*
- * In the worst case, when both user and proj quotas on,
+ * In the worst case, when both user and group quotas are on,
  * we can have a max of three dquots changing in a single transaction.
  */
 #define XFS_DQUOT_LOGRES(mp)   (sizeof(xfs_disk_dquot_t) * 3)
index f8d9049a07379dd59816b952b1e5f246e1a9f3da..f4a6d10aafa86258dcd9a86d9cd62cba7410305c 100644 (file)
@@ -45,7 +45,7 @@
 typedef struct xfs_dq_logformat {
        __uint16_t              qlf_type;      /* dquot log item type */
        __uint16_t              qlf_size;      /* size of this item */
-       xfs_dqid_t              qlf_id;        /* usr/proj id number : 32 bits */
+       xfs_dqid_t              qlf_id;        /* usr/grp id number : 32 bits */
        __int64_t               qlf_blkno;     /* blkno of dquot buffer */
        __int32_t               qlf_len;       /* len of dquot buffer */
        __uint32_t              qlf_boffset;   /* off of dquot in buffer */
@@ -62,7 +62,7 @@ typedef struct xfs_dq_logformat {
 typedef struct xfs_qoff_logformat {
        unsigned short          qf_type;        /* quotaoff log item type */
        unsigned short          qf_size;        /* size of this item */
-       unsigned int            qf_flags;       /* USR and/or PRJ */
+       unsigned int            qf_flags;       /* USR and/or GRP */
        char                    qf_pad[12];     /* padding for future */
 } xfs_qoff_logformat_t;
 
index cb0b0ac139a639750f8065af390c1229f10db44c..f6385fd44ce1fe776b285879d57909f5bddababe 100644 (file)
@@ -133,7 +133,7 @@ typedef     struct xfs_dio {
        struct pm       *xd_pmp;
        int             xd_blkalgn;
        int             xd_ioflag;
-       xfs_off_t               xd_start;
+       xfs_off_t       xd_start;
        size_t          xd_length;
 } xfs_dio_t;
 
@@ -298,7 +298,7 @@ typedef struct xfs_inode {
        struct xfs_mount        *i_mount;       /* fs mount struct ptr */
        struct bhv_desc         i_bhv_desc;     /* inode behavior descriptor*/
        struct xfs_dquot        *i_udquot;      /* user dquot */
-       struct xfs_dquot        *i_pdquot;      /* project dquot */
+       struct xfs_dquot        *i_gdquot;      /* group dquot */
 
        /* Inode location stuff */
        xfs_ino_t               i_ino;          /* inode number (agno/agino)*/
index 794b90ee2dd7c15de39174bd9dd70b19976e376a..2dd83faa74f179a16c8f5402451774c4b65fa8ca 100644 (file)
 #define __XFS_QUOTA_H__
 
 /* 
- * We use only 16-bit prid's in the inode, not the 64-bit version in the proc.
- * uid_t is hard-coded to 32 bits in the inode. Hence, an 'id' in a dquot is
- * 32 bits..
+ * uid_t and gid_t are hard-coded to 32 bits in the inode.
+ * Hence, an 'id' in a dquot is 32 bits..
  */
 typedef __int32_t      xfs_dqid_t;
+
 /*
  * Eventhough users may not have quota limits occupying all 64-bits, 
  * they may need 64-bit accounting. Hence, 64-bit quota-counters,
- * and quota-limits. This is a waste in the common case, but heh ...
+ * and quota-limits. This is a waste in the common case, but hey ...
  */
 typedef __uint64_t     xfs_qcnt_t;
 typedef __uint16_t      xfs_qwarncnt_t;
@@ -52,17 +52,18 @@ typedef __uint16_t      xfs_qwarncnt_t;
 #define XFS_UQUOTA_ACCT        0x0001  /* user quota accounting ON */
 #define XFS_UQUOTA_ENFD        0x0002  /* user quota limits enforced */
 #define XFS_UQUOTA_CHKD        0x0004  /* quotacheck run on usr quotas */
-#define XFS_PQUOTA_ACCT        0x0008  /* project quota accounting ON */
-#define XFS_PQUOTA_ENFD        0x0010  /* proj quota limits enforced */
-#define XFS_PQUOTA_CHKD        0x0020  /* quotacheck run on prj quotas */
+#define XFS_PQUOTA_ACCT        0x0008  /* (IRIX) project quota accounting ON */
+#define XFS_GQUOTA_ENFD        0x0010  /* group quota limits enforced */
+#define XFS_GQUOTA_CHKD        0x0020  /* quotacheck run on grp quotas */
+#define XFS_GQUOTA_ACCT        0x0040  /* group quota accounting ON */
 
 /* 
  * Incore only flags for quotaoff - these bits get cleared when quota(s)
  * are in the process of getting turned off. These flags are in m_qflags but
  * never in sb_qflags.
  */
-#define XFS_UQUOTA_ACTIVE      0x0040  /* uquotas are being turned off */
-#define XFS_PQUOTA_ACTIVE      0x0080  /* pquotas are being turned off */
+#define XFS_UQUOTA_ACTIVE      0x0080  /* uquotas are being turned off */
+#define XFS_GQUOTA_ACTIVE      0x0100  /* gquotas are being turned off */
 
 /*
  * Typically, we turn quotas off if we weren't explicitly asked to 
@@ -72,16 +73,16 @@ typedef __uint16_t      xfs_qwarncnt_t;
  * This stops quotas getting turned off in the root filesystem everytime
  * the system boots up a miniroot.
  */
-#define XFS_QUOTA_MAYBE                0x0100 /* Turn quotas on if SB has quotas on */
+#define XFS_QUOTA_MAYBE                0x0200 /* Turn quotas on if SB has quotas on */
 
 /*
  * Checking XFS_IS_*QUOTA_ON() while holding any inode lock guarantees
  * quota will be not be switched off as long as that inode lock is held.
  */
 #define XFS_IS_QUOTA_ON(mp)    ((mp)->m_qflags & (XFS_UQUOTA_ACTIVE | \
-                                                  XFS_PQUOTA_ACTIVE))
+                                                  XFS_GQUOTA_ACTIVE))
 #define XFS_IS_UQUOTA_ON(mp)   ((mp)->m_qflags & XFS_UQUOTA_ACTIVE)
-#define XFS_IS_PQUOTA_ON(mp)   ((mp)->m_qflags & XFS_PQUOTA_ACTIVE)
+#define XFS_IS_GQUOTA_ON(mp)   ((mp)->m_qflags & XFS_GQUOTA_ACTIVE)
 
 /*
  * Flags to tell various functions what to do. Not all of these are meaningful
@@ -91,7 +92,7 @@ typedef __uint16_t      xfs_qwarncnt_t;
 #define XFS_QMOPT_DQLOCK       0x0000001 /* dqlock */
 #define XFS_QMOPT_DQALLOC      0x0000002 /* alloc dquot ondisk if needed */
 #define XFS_QMOPT_UQUOTA       0x0000004 /* user dquot requested */
-#define XFS_QMOPT_PQUOTA       0x0000008 /* proj dquot requested */
+#define XFS_QMOPT_GQUOTA       0x0000008 /* group dquot requested */
 #define XFS_QMOPT_FORCE_RES    0x0000010 /* ignore quota limits */
 #define XFS_QMOPT_DQSUSER      0x0000020 /* don't cache super users dquot */
 #define XFS_QMOPT_SBVERSION    0x0000040 /* change superblock version num */
@@ -135,7 +136,7 @@ typedef __uint16_t      xfs_qwarncnt_t;
 #define XFS_TRANS_DQ_DELRTBCOUNT XFS_QMOPT_DELRTBCOUNT
 
 
-#define XFS_QMOPT_QUOTALL      (XFS_QMOPT_UQUOTA|XFS_QMOPT_PQUOTA)
+#define XFS_QMOPT_QUOTALL      (XFS_QMOPT_UQUOTA|XFS_QMOPT_GQUOTA)
 #define XFS_QMOPT_RESBLK_MASK  (XFS_QMOPT_RES_REGBLKS | XFS_QMOPT_RES_RTBLKS)
 
 /*
@@ -149,21 +150,21 @@ typedef __uint16_t      xfs_qwarncnt_t;
  */
 #define XFS_NOT_DQATTACHED(mp, ip) ((XFS_IS_UQUOTA_ON(mp) &&\
                                     (ip)->i_udquot == NULL) || \
-                                   (XFS_IS_PQUOTA_ON(mp) && \
-                                    (ip)->i_pdquot == NULL))
+                                   (XFS_IS_GQUOTA_ON(mp) && \
+                                    (ip)->i_gdquot == NULL))
 
 #define XFS_QM_NEED_QUOTACHECK(mp) ((XFS_IS_UQUOTA_ON(mp) && \
                                     (mp->m_sb.sb_qflags & \
                                      XFS_UQUOTA_CHKD) == 0) || \
-                                   (XFS_IS_PQUOTA_ON(mp) && \
+                                   (XFS_IS_GQUOTA_ON(mp) && \
                                     (mp->m_sb.sb_qflags & \
-                                     XFS_PQUOTA_CHKD) == 0))
+                                     XFS_GQUOTA_CHKD) == 0))
 
 #define XFS_MOUNT_QUOTA_ALL    (XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|\
-                                XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|\
-                                XFS_PQUOTA_ENFD|XFS_PQUOTA_CHKD)
+                                XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|\
+                                XFS_GQUOTA_ENFD|XFS_GQUOTA_CHKD)
 #define XFS_MOUNT_QUOTA_MASK   (XFS_MOUNT_QUOTA_ALL | XFS_UQUOTA_ACTIVE | \
-                                XFS_PQUOTA_ACTIVE)
+                                XFS_GQUOTA_ACTIVE)
 
 #define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME)
 
@@ -230,13 +231,13 @@ extern struct xfs_dquot * xfs_qm_vop_chown(struct xfs_trans *,
                                                 struct xfs_dquot *);
 extern int             xfs_qm_vop_dqalloc(struct xfs_mount *,
                                           struct xfs_inode *,
-                                          uid_t, xfs_prid_t, uint,
+                                          uid_t, gid_t, uint,
                                           struct xfs_dquot     **,
                                           struct xfs_dquot     **);
 
 extern int             xfs_qm_vop_chown_dqalloc(struct xfs_mount *,
                                                 struct xfs_inode *,
-                                                int, uid_t, xfs_prid_t,
+                                                int, uid_t, gid_t,
                                                 struct xfs_dquot **,
                                                 struct xfs_dquot **);
 
@@ -294,11 +295,11 @@ xfs_trans_reserve_quota_nblks(tp, ip, nblks, 0, XFS_QMOPT_RES_REGBLKS)
 #define        xfs_trans_unreserve_blkquota(tp, ip, nblks) \
 xfs_trans_reserve_quota_nblks(tp, ip, -(nblks), 0, XFS_QMOPT_RES_REGBLKS)
 
-#define        xfs_trans_reserve_quota(tp, udq, pdq, nb, ni, f) \
-xfs_trans_reserve_quota_bydquots(tp, udq, pdq, nb, ni, f|XFS_QMOPT_RES_REGBLKS) 
+#define        xfs_trans_reserve_quota(tp, udq, gdq, nb, ni, f) \
+xfs_trans_reserve_quota_bydquots(tp, udq, gdq, nb, ni, f|XFS_QMOPT_RES_REGBLKS) 
 
-#define        xfs_trans_unreserve_quota(tp, ud, pd, b, i, f) \
-xfs_trans_reserve_quota_bydquots(tp, ud, pd, -(b), -(i), f|XFS_QMOPT_RES_REGBLKS)
+#define        xfs_trans_unreserve_quota(tp, ud, gd, b, i, f) \
+xfs_trans_reserve_quota_bydquots(tp, ud, gd, -(b), -(i), f|XFS_QMOPT_RES_REGBLKS)
 
 /*
  * Realtime disk block quota reservations 
index 6526d107e366b8de4f3fc71ca57f55d37cbbe903..f015bee134f3d6b56c5f4ea637eb8e3926a64561 100644 (file)
@@ -129,7 +129,7 @@ typedef struct xfs_sb
         * End contiguous fields.
         */
        xfs_ino_t       sb_uquotino;    /* user quota inode */
-       xfs_ino_t       sb_pquotino;    /* project quota inode */
+       xfs_ino_t       sb_gquotino;    /* group quota inode */
        __uint16_t      sb_qflags;      /* quota flags */
        __uint8_t       sb_flags;       /* misc. flags */
        __uint8_t       sb_shared_vn;   /* shared version number */
@@ -153,7 +153,7 @@ typedef enum {
        XFS_SBS_SECTLOG, XFS_SBS_INODELOG, XFS_SBS_INOPBLOG, XFS_SBS_AGBLKLOG,
        XFS_SBS_REXTSLOG, XFS_SBS_INPROGRESS, XFS_SBS_IMAX_PCT, XFS_SBS_ICOUNT,
        XFS_SBS_IFREE, XFS_SBS_FDBLOCKS, XFS_SBS_FREXTENTS, XFS_SBS_UQUOTINO,
-       XFS_SBS_PQUOTINO, XFS_SBS_QFLAGS, XFS_SBS_FLAGS, XFS_SBS_SHARED_VN,
+       XFS_SBS_GQUOTINO, XFS_SBS_QFLAGS, XFS_SBS_FLAGS, XFS_SBS_SHARED_VN,
        XFS_SBS_INOALIGNMT, XFS_SBS_UNIT, XFS_SBS_WIDTH, XFS_SBS_DIRBLKLOG,
         XFS_SBS_DUMMY,
        XFS_SBS_FIELDCOUNT
@@ -171,7 +171,7 @@ typedef enum {
 #define        XFS_SB_RSUMINO          XFS_SB_MVAL(RSUMINO)
 #define        XFS_SB_VERSIONNUM       XFS_SB_MVAL(VERSIONNUM)
 #define XFS_SB_UQUOTINO                XFS_SB_MVAL(UQUOTINO)
-#define XFS_SB_PQUOTINO                XFS_SB_MVAL(PQUOTINO)
+#define XFS_SB_GQUOTINO                XFS_SB_MVAL(GQUOTINO)
 #define XFS_SB_QFLAGS          XFS_SB_MVAL(QFLAGS)
 #define XFS_SB_SHARED_VN       XFS_SB_MVAL(SHARED_VN)
 #define XFS_SB_UNIT            XFS_SB_MVAL(UNIT)
@@ -180,7 +180,7 @@ typedef enum {
 #define        XFS_SB_ALL_BITS         ((1LL << XFS_SB_NUM_BITS) - 1)
 #define        XFS_SB_MOD_BITS         \
        (XFS_SB_UUID | XFS_SB_ROOTINO | XFS_SB_RBMINO | XFS_SB_RSUMINO | \
-        XFS_SB_VERSIONNUM | XFS_SB_UQUOTINO | XFS_SB_PQUOTINO | \
+        XFS_SB_VERSIONNUM | XFS_SB_UQUOTINO | XFS_SB_GQUOTINO | \
         XFS_SB_QFLAGS | XFS_SB_SHARED_VN | XFS_SB_UNIT | XFS_SB_WIDTH)
 
 /*
index d4390389c079bf1dc65baa550aeef2ced0655fd3..07b9181d47e15f76dea268ea7ebcacf93b2ddf70 100644 (file)
@@ -118,19 +118,17 @@ typedef struct fs_disk_quota {
  */
 #define XFS_QUOTA_UDQ_ACCT     (1<<0)  /* user quota accounting */
 #define XFS_QUOTA_UDQ_ENFD     (1<<1)  /* user quota limits enforcement */
-#define XFS_QUOTA_PDQ_ACCT     (1<<2)  /* project quota accounting */
-#define XFS_QUOTA_PDQ_ENFD     (1<<3)  /* project quota limits enforcement */
-#define XFS_QUOTA_GDQ_ACCT     (1<<4)  /* group quota accounting */
-#define XFS_QUOTA_GDQ_ENFD     (1<<5)  /* group 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_USER_QUOTA         (1<<0)  /* user quota type */
-#define XFS_PROJ_QUOTA         (1<<1)  /* project quota type */
+#define XFS_PROJ_QUOTA         (1<<1)  /* (IRIX) project quota type */
 #define XFS_GROUP_QUOTA                (1<<2)  /* group quota type */
 
 /*
  * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system.
  * Provides a centralized way to get meta infomation about the quota subsystem.
- * eg. space taken up for user and aggregate quotas, number of dquots currently
+ * eg. space taken up for user and group quotas, number of dquots currently
  * incore.
  */
 #define FS_QSTAT_VERSION       1       /* fs_quota_stat.qs_version */
@@ -149,7 +147,7 @@ typedef struct fs_quota_stat {
        __u16           qs_flags;       /* XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD} */
        __s8            qs_pad;         /* unused */
        fs_qfilestat_t  qs_uquota;      /* user quota storage information */
-       fs_qfilestat_t  qs_aquota;      /* aggr quota storage information */
+       fs_qfilestat_t  qs_gquota;      /* group quota storage information */
        __u32           qs_incoredqs;   /* number of dquots incore */
        __s32           qs_btimelimit;  /* limit for blks timer */      
        __s32           qs_itimelimit;  /* limit for inodes timer */    
index 88e597e72831fdfda29ba2d77d306425c4fa2e6e..3e61ca9be5beaa8fe9967ea42295bdc13fc99d91 100644 (file)
@@ -2002,7 +2002,7 @@ xfs_bmap_alloc(
                         */
                        if (XFS_IS_QUOTA_ON(mp) &&
                            ap->ip->i_ino != mp->m_sb.sb_uquotino &&
-                           ap->ip->i_ino != mp->m_sb.sb_pquotino)
+                           ap->ip->i_ino != mp->m_sb.sb_gquotino)
                                xfs_trans_mod_dquot_byino(ap->tp, ap->ip,
                                        ap->wasdel ?
                                                XFS_TRANS_DQ_DELRTBCOUNT :
@@ -2226,7 +2226,7 @@ xfs_bmap_alloc(
                         */
                        if (XFS_IS_QUOTA_ON(mp) &&
                            ap->ip->i_ino != mp->m_sb.sb_uquotino &&
-                           ap->ip->i_ino != mp->m_sb.sb_pquotino)
+                           ap->ip->i_ino != mp->m_sb.sb_gquotino)
                                xfs_trans_mod_dquot_byino(ap->tp, ap->ip,
                                        ap->wasdel ?
                                                XFS_TRANS_DQ_DELBCOUNT :
@@ -2293,7 +2293,7 @@ xfs_bmap_btree_to_extents(
        ip->i_d.di_nblocks--;
        if (XFS_IS_QUOTA_ON(mp) &&
            ip->i_ino != mp->m_sb.sb_uquotino &&
-           ip->i_ino != mp->m_sb.sb_pquotino)
+           ip->i_ino != mp->m_sb.sb_gquotino)
                xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, -1L);
        xfs_trans_binval(tp, cbp);
        if (cur->bc_bufs[0] == cbp)
@@ -2393,7 +2393,7 @@ xfs_bmap_del_extent(
                        nblks = len * mp->m_sb.sb_rextsize;
                        if (XFS_IS_QUOTA_ON(mp) &&
                            ip->i_ino != mp->m_sb.sb_uquotino &&
-                           ip->i_ino != mp->m_sb.sb_pquotino)
+                           ip->i_ino != mp->m_sb.sb_gquotino)
                                qfield = XFS_TRANS_DQ_RTBCOUNT;
                }
                /*
@@ -2404,7 +2404,7 @@ xfs_bmap_del_extent(
                        nblks = del->br_blockcount;
                        if (XFS_IS_QUOTA_ON(mp) &&
                            ip->i_ino != mp->m_sb.sb_uquotino &&
-                           ip->i_ino != mp->m_sb.sb_pquotino)
+                           ip->i_ino != mp->m_sb.sb_gquotino)
                                qfield = XFS_TRANS_DQ_BCOUNT;
                        /*
                         * If we're freeing meta-data, then the transaction
@@ -2789,7 +2789,7 @@ xfs_bmap_extents_to_btree(
        ip->i_d.di_nblocks++;
        if (XFS_IS_QUOTA_ON(mp) &&
            ip->i_ino != mp->m_sb.sb_uquotino &&
-           ip->i_ino != mp->m_sb.sb_pquotino)
+           ip->i_ino != mp->m_sb.sb_gquotino)
                xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT, 1L);
        abp = xfs_btree_get_bufl(mp, tp, args.fsbno, 0);
        /*
@@ -2934,7 +2934,7 @@ xfs_bmap_local_to_extents(
                ip->i_d.di_nblocks = 1;
                if (XFS_IS_QUOTA_ON(args.mp) &&
                    ip->i_ino != args.mp->m_sb.sb_uquotino &&
-                   ip->i_ino != args.mp->m_sb.sb_pquotino)
+                   ip->i_ino != args.mp->m_sb.sb_gquotino)
                        xfs_trans_mod_dquot_byino(tp, ip, XFS_TRANS_DQ_BCOUNT,
                                1L);
                flags |= XFS_ILOG_FEXT(whichfork);
@@ -4345,7 +4345,7 @@ xfs_bunmapi(
                                (int)del.br_blockcount, rsvd);
                        if (XFS_IS_QUOTA_ON(ip->i_mount)) {
                                ASSERT(ip->i_ino != mp->m_sb.sb_uquotino);
-                               ASSERT(ip->i_ino != mp->m_sb.sb_pquotino);
+                               ASSERT(ip->i_ino != mp->m_sb.sb_gquotino);
                                if (!isrt)
                                        xfs_trans_unreserve_blkquota(NULL, ip, 
                                              (long)del.br_blockcount);
index a221892e4d3f194763c2ea97cf6d3d75251c1447..68c187760b73c8631aada054b391064926e6f311 100644 (file)
@@ -383,7 +383,7 @@ xfs_bmbt_delrec(
        xfs_trans_log_inode(cur->bc_tp, cur->bc_private.b.ip, XFS_ILOG_CORE);
        if (XFS_IS_QUOTA_ON(mp) &&
            cur->bc_private.b.ip->i_ino != mp->m_sb.sb_uquotino &&
-           cur->bc_private.b.ip->i_ino != mp->m_sb.sb_pquotino)
+           cur->bc_private.b.ip->i_ino != mp->m_sb.sb_gquotino)
                xfs_trans_mod_dquot_byino(cur->bc_tp, cur->bc_private.b.ip, 
                        XFS_TRANS_DQ_BCOUNT, -1L);
        xfs_trans_binval(cur->bc_tp, rbp);
@@ -681,7 +681,7 @@ xfs_bmbt_killroot(
        ip->i_d.di_nblocks--;
        if (XFS_IS_QUOTA_ON(cur->bc_mp) &&
            ip->i_ino != cur->bc_mp->m_sb.sb_uquotino &&
-           ip->i_ino != cur->bc_mp->m_sb.sb_pquotino)
+           ip->i_ino != cur->bc_mp->m_sb.sb_gquotino)
                xfs_trans_mod_dquot_byino(cur->bc_tp, ip, XFS_TRANS_DQ_BCOUNT,
                        -1L);
        xfs_trans_binval(cur->bc_tp, cbp);
@@ -1278,7 +1278,7 @@ xfs_bmbt_split(
        xfs_trans_log_inode(args.tp, cur->bc_private.b.ip, XFS_ILOG_CORE);
        if (XFS_IS_QUOTA_ON(args.mp) &&
            cur->bc_private.b.ip->i_ino != args.mp->m_sb.sb_uquotino &&
-           cur->bc_private.b.ip->i_ino != args.mp->m_sb.sb_pquotino)
+           cur->bc_private.b.ip->i_ino != args.mp->m_sb.sb_gquotino)
                xfs_trans_mod_dquot_byino(args.tp, cur->bc_private.b.ip,
                        XFS_TRANS_DQ_BCOUNT, 1L);
        rbp = xfs_btree_get_bufl(args.mp, args.tp, args.fsbno, 0);
@@ -2115,7 +2115,7 @@ xfs_bmbt_newroot(
        cur->bc_private.b.ip->i_d.di_nblocks++;
        if (XFS_IS_QUOTA_ON(args.mp) &&
            cur->bc_private.b.ip->i_ino != args.mp->m_sb.sb_uquotino &&
-           cur->bc_private.b.ip->i_ino != args.mp->m_sb.sb_pquotino)
+           cur->bc_private.b.ip->i_ino != args.mp->m_sb.sb_gquotino)
                xfs_trans_mod_dquot_byino(args.tp, cur->bc_private.b.ip,
                                          XFS_TRANS_DQ_BCOUNT, 1L);
        bp = xfs_btree_get_bufl(args.mp, cur->bc_tp, args.fsbno, 0);
index c4de3b9d214c5ecff8816b98868b743f64a0763a..61ab1ee770fac40319aa5433d3aaa18309aa5ade 100644 (file)
@@ -136,7 +136,7 @@ static struct {
     { offsetof(xfs_sb_t, sb_fdblocks),   0 },
     { offsetof(xfs_sb_t, sb_frextents),  0 },
     { offsetof(xfs_sb_t, sb_uquotino),   0 },
-    { offsetof(xfs_sb_t, sb_pquotino),   0 },
+    { offsetof(xfs_sb_t, sb_gquotino),   0 },
     { offsetof(xfs_sb_t, sb_qflags),     0 },
     { offsetof(xfs_sb_t, sb_flags),      0 },
     { offsetof(xfs_sb_t, sb_shared_vn),  0 },
index a1a81cc99ac7a3f0ec1533fd595a7864f35c427a..b0a0e410536a012d891465070e959471d84a6581 100644 (file)
@@ -224,8 +224,8 @@ xlog_recover_print_quotaoff(
        ASSERT(qoff_f);
        if (qoff_f->qf_flags & XFS_UQUOTA_ACCT) 
                strcpy(str, "USER QUOTA");
-       if (qoff_f->qf_flags & XFS_PQUOTA_ACCT)
-               strcat(str, "PROJ QUOTA");
+       if (qoff_f->qf_flags & XFS_GQUOTA_ACCT)
+               strcat(str, "GROUP QUOTA");
        printf("\tQUOTAOFF: #regs:%d   type:%s\n",
               qoff_f->qf_size, str);
 }
index 3a4650cfb8e57d6fc9adbc6a7f150c068150c207..5c4833251811d84ee66f5a5443a3b3d92a9b9561 100644 (file)
@@ -1526,7 +1526,7 @@ main(int argc, char **argv)
        sbp->sb_fdblocks = dblocks - agcount * XFS_PREALLOC_BLOCKS(mp) -
                (loginternal ? logblocks : 0);
        sbp->sb_frextents = 0;  /* will do a free later */
-       sbp->sb_uquotino = sbp->sb_pquotino = 0;
+       sbp->sb_uquotino = sbp->sb_gquotino = 0;
        sbp->sb_qflags = 0;
        sbp->sb_unit = dsunit;
        sbp->sb_width = dswidth;
index 0a4200f7c366636c3331b014470a18c17557690f..40ed713be28f55a56c6c122e6b6bed31540392fa 100644 (file)
@@ -304,13 +304,13 @@ secondary_sb_wack(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
                        rval |= XR_AG_SB_SEC;
        }
 
-       if (sb->sb_inprogress == 1 && sb->sb_pquotino)  {
+       if (sb->sb_inprogress == 1 && sb->sb_gquotino)  {
                if (!no_modify)
-                       sb->sb_pquotino = 0;
+                       sb->sb_gquotino = 0;
                if (sb->sb_versionnum & XR_PART_SECSB_VNMASK || !do_bzero)  {
                        rval |= XR_AG_SB;
                        do_warn(
-                       "non-null project quota inode field in superblock %d\n",
+                       "non-null group quota inode field in superblock %d\n",
                                i);
                } else
                        rval |= XR_AG_SB_SEC;
index 2dcd982980cead0da406206ada8e7349bb48d63c..a1f372b8a633a921c9832d078377ceb97b0ee055 100644 (file)
@@ -1982,9 +1982,9 @@ process_dinode_int(xfs_mount_t *mp,
 
                        return(1);
                }
-       } else if (lino == mp->m_sb.sb_pquotino)  {
+       } else if (lino == mp->m_sb.sb_gquotino)  {
                if (type != XR_INO_DATA)  {
-                       do_warn("project quota inode has bad type 0x%x\n",
+                       do_warn("group quota inode has bad type 0x%x\n",
                                INT_GET(dinoc->di_mode, ARCH_CONVERT) & IFMT);
 
                        if (!no_modify)  {
@@ -1996,7 +1996,7 @@ process_dinode_int(xfs_mount_t *mp,
                        *used = is_free;
                        *isa_dir = 0;
 
-                       mp->m_sb.sb_pquotino = NULLFSINO;
+                       mp->m_sb.sb_gquotino = NULLFSINO;
 
                        return(1);
                }
index 4854b54e5995b5dde5eea3c5a687aece492ceefe..ee5a40154698abc5d14f318d68f6358cafb42739 100644 (file)
@@ -183,9 +183,9 @@ process_shortform_dir(
        "entry in shorform dir %llu references user quota inode %llu\n",
                                ino, lino);
                        junkit = 1;
-               } else if (lino == mp->m_sb.sb_pquotino)  {
+               } else if (lino == mp->m_sb.sb_gquotino)  {
                        do_warn(
-       "entry in shorform dir %llu references proj quota inode %llu\n",
+       "entry in shorform dir %llu references group quota inode %llu\n",
                                ino, lino);
                        junkit = 1;
                } else if ((irec_p = find_inode_rec(XFS_INO_TO_AGNO(mp, lino),
@@ -1924,9 +1924,9 @@ process_leaf_dir_block(
                                do_warn(
                                "\twould clear ino number in entry %d...\n", i);
                        }
-               } else if (lino == mp->m_sb.sb_pquotino)  {
+               } else if (lino == mp->m_sb.sb_gquotino)  {
                        do_warn(
-"entry #%d, bno %d in directory %llu references proj quota inode %llu\n",
+"entry #%d, bno %d in directory %llu references group quota inode %llu\n",
                                i, da_bno, ino, lino);
                        if (!no_modify)  {
                                do_warn(
index e2675df9b865498fae735cddf65ad9649872a983..4074800b165906cf666e60d75d5c705bbd3ce00b 100644 (file)
@@ -890,9 +890,9 @@ process_sf_dir2(
                } else if (lino == mp->m_sb.sb_uquotino)  {
                        junkit = 1;
                        junkreason = "user quota";
-               } else if (lino == mp->m_sb.sb_pquotino)  {
+               } else if (lino == mp->m_sb.sb_gquotino)  {
                        junkit = 1;
-                       junkreason = "project quota";
+                       junkreason = "group quota";
                } else if ((irec_p = find_inode_rec(XFS_INO_TO_AGNO(mp, lino),
                                        XFS_INO_TO_AGINO(mp, lino))) != NULL) {
                        /*
@@ -1401,9 +1401,9 @@ process_dir2_data(
                } else if (INT_GET(dep->inumber, ARCH_CONVERT) == mp->m_sb.sb_uquotino) {
                        clearino = 1;
                        clearreason = "user quota";
-               } else if (INT_GET(dep->inumber, ARCH_CONVERT) == mp->m_sb.sb_pquotino) {
+               } else if (INT_GET(dep->inumber, ARCH_CONVERT) == mp->m_sb.sb_gquotino) {
                        clearino = 1;
-                       clearreason = "project quota";
+                       clearreason = "group quota";
                } else if (INT_GET(dep->inumber, ARCH_CONVERT) == old_orphanage_ino) {
                        /*
                         * Do nothing, silently ignore it, entry has already
index 5c33d5f6f7018b29726d1a2c58885d42c5cc5102..708c69ec5e44d8e4495382cdbfccd220788b5c1e 100644 (file)
@@ -146,9 +146,9 @@ EXTERN int          need_rsumino;
 
 EXTERN int             lost_quotas;
 EXTERN int             have_uquotino;
-EXTERN int             have_pquotino;
+EXTERN int             have_gquotino;
 EXTERN int             lost_uquotino;
-EXTERN int             lost_pquotino;
+EXTERN int             lost_gquotino;
 
 EXTERN xfs_agino_t     first_prealloc_ino;
 EXTERN xfs_agino_t     last_prealloc_ino;
index d3e0bd10dcbd5af57dd0c131874d5049a78e8687..3984430b3ee19f19c653dc97af4a9554ebf01a79 100644 (file)
@@ -1073,16 +1073,16 @@ quotino_check(xfs_mount_t *mp)
                        lost_uquotino = 0;
        }
 
-       if (mp->m_sb.sb_pquotino != NULLFSINO && mp->m_sb.sb_pquotino != 0)  {
-               irec = find_inode_rec(XFS_INO_TO_AGNO(mp, mp->m_sb.sb_pquotino),
-                       XFS_INO_TO_AGINO(mp, mp->m_sb.sb_pquotino));
+       if (mp->m_sb.sb_gquotino != NULLFSINO && mp->m_sb.sb_gquotino != 0)  {
+               irec = find_inode_rec(XFS_INO_TO_AGNO(mp, mp->m_sb.sb_gquotino),
+                       XFS_INO_TO_AGINO(mp, mp->m_sb.sb_gquotino));
 
                if (irec == NULL || is_inode_free(irec,
-                               mp->m_sb.sb_pquotino - irec->ino_startnum))  {
-                       mp->m_sb.sb_pquotino = NULLFSINO;
-                       lost_pquotino = 1;
+                               mp->m_sb.sb_gquotino - irec->ino_startnum))  {
+                       mp->m_sb.sb_gquotino = NULLFSINO;
+                       lost_gquotino = 1;
                } else
-                       lost_pquotino = 0;
+                       lost_gquotino = 0;
        }
 }
 
@@ -1110,11 +1110,11 @@ quota_sb_check(xfs_mount_t *mp)
 
        if (fs_quotas &&
            (mp->m_sb.sb_uquotino == NULLFSINO || mp->m_sb.sb_uquotino == 0) &&
-           (mp->m_sb.sb_pquotino == NULLFSINO || mp->m_sb.sb_pquotino == 0))  {
+           (mp->m_sb.sb_gquotino == NULLFSINO || mp->m_sb.sb_gquotino == 0))  {
                lost_quotas = 1;
                fs_quotas = 0;
        } else if (!verify_inum(mp, mp->m_sb.sb_uquotino) &&
-                       !verify_inum(mp, mp->m_sb.sb_uquotino))  {
+                       !verify_inum(mp, mp->m_sb.sb_gquotino)) {
                fs_quotas = 1;
        }
 }
index 1babc07c98d76855ca7591469c4ae86edbdac0bb..db2dd98f0f102ad5afc83c8db5c6045115c8cef4 100644 (file)
@@ -3747,12 +3747,12 @@ mark_standalone_inodes(xfs_mount_t *mp)
                                        - irec->ino_startnum;
                        add_inode_reached(irec, offset);
                }
-               if (mp->m_sb.sb_pquotino
-                               && mp->m_sb.sb_pquotino != NULLFSINO)  {
+               if (mp->m_sb.sb_gquotino
+                               && mp->m_sb.sb_gquotino != NULLFSINO)  {
                        irec = find_inode_rec(XFS_INO_TO_AGNO(mp,
-                                               mp->m_sb.sb_pquotino),
-                               XFS_INO_TO_AGINO(mp, mp->m_sb.sb_pquotino));
-                       offset = XFS_INO_TO_AGINO(mp, mp->m_sb.sb_pquotino)
+                                               mp->m_sb.sb_gquotino),
+                               XFS_INO_TO_AGINO(mp, mp->m_sb.sb_gquotino));
+                       offset = XFS_INO_TO_AGINO(mp, mp->m_sb.sb_gquotino)
                                        - irec->ino_startnum;
                        add_inode_reached(irec, offset);
                }
index 5133f2063aad0b4524b2c37b28fc71cfac23f2db..f4a072e931aecbcd2986d3651a9dd66587050f8f 100644 (file)
@@ -50,14 +50,14 @@ copy_sb(xfs_sb_t *source, xfs_sb_t *dest)
        xfs_ino_t       rbmino;
        xfs_ino_t       rsumino;
        xfs_ino_t       uquotino;
-       xfs_ino_t       pquotino;
+       xfs_ino_t       gquotino;
        __uint16_t      versionnum;
 
        rootino = dest->sb_rootino;
        rbmino = dest->sb_rbmino;
        rsumino = dest->sb_rsumino;
        uquotino = dest->sb_uquotino;
-       pquotino = dest->sb_pquotino;
+       gquotino = dest->sb_gquotino;
 
        versionnum = dest->sb_versionnum;
 
@@ -67,7 +67,7 @@ copy_sb(xfs_sb_t *source, xfs_sb_t *dest)
        dest->sb_rbmino = rbmino;
        dest->sb_rsumino = rsumino;
        dest->sb_uquotino = uquotino;
-       dest->sb_pquotino = pquotino;
+       dest->sb_gquotino = gquotino;
 
        dest->sb_versionnum = versionnum;
 
index 526be222140dfd9b014e60148d8162765efcede8..46b758ba6e39ba5bfa728b9fc908a7ad620eb348 100644 (file)
@@ -78,8 +78,8 @@ update_sb_version(xfs_mount_t *mp)
                 * protect against stray bits in the quota flag field
                 */
                if (sb->sb_qflags & ~(XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|
-                               XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|
-                               XFS_PQUOTA_ENFD|XFS_PQUOTA_CHKD))  {
+                               XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|
+                               XFS_GQUOTA_ENFD|XFS_GQUOTA_CHKD))  {
                        /*
                         * update the incore superblock, if we're in
                         * no_modify mode, it'll never get flushed out
@@ -88,13 +88,13 @@ update_sb_version(xfs_mount_t *mp)
                        do_warn("bogus quota flags 0x%x set in superblock",
                                sb->sb_qflags & ~(XFS_UQUOTA_ACCT|
                                XFS_UQUOTA_ENFD|
-                               XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|
-                               XFS_PQUOTA_ENFD|XFS_PQUOTA_CHKD));
+                               XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|
+                               XFS_GQUOTA_ENFD|XFS_GQUOTA_CHKD));
 
                        sb->sb_qflags &= (XFS_UQUOTA_ACCT|
                                XFS_UQUOTA_ENFD|
-                               XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|
-                               XFS_PQUOTA_ENFD|XFS_PQUOTA_CHKD);
+                               XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|
+                               XFS_GQUOTA_ENFD|XFS_GQUOTA_CHKD);
 
                        if (!no_modify)
                                do_warn(", bogus flags will be cleared\n");
@@ -123,8 +123,6 @@ update_sb_version(xfs_mount_t *mp)
                                XFS_SB_VERSION_SUBALIGN(sb);
                }
        }
-
-       return;
 }
 
 /*
@@ -145,7 +143,7 @@ parse_sb_version(xfs_sb_t *sb)
        fs_ino_alignment = 0;
        fs_has_extflgbit = 0;
        have_uquotino = 0;
-       have_pquotino = 0;
+       have_gquotino = 0;
        issue_warning = 0;
 
        /*
@@ -271,9 +269,9 @@ Please run a 6.5 version of xfs_repair.\n");
                                        sb->sb_uquotino != NULLFSINO)
                                have_uquotino = 1;
 
-                       if (sb->sb_pquotino != 0 &&
-                                       sb->sb_pquotino != NULLFSINO)
-                               have_pquotino = 1;
+                       if (sb->sb_gquotino != 0 &&
+                                       sb->sb_gquotino != NULLFSINO)
+                               have_gquotino = 1;
                }
        }
 
index 9f320315641e0a847465b2d8d9ff71cc0d95ceba..951e3b9308cd2bf8163209abb428d19ab60326aa 100644 (file)
@@ -488,7 +488,7 @@ main(int argc, char **argv)
        "Inode allocation btrees are too corrupted, skipping phases 6 and 7\n");
        }
 
-       if (lost_quotas && !have_uquotino && !have_pquotino)  {
+       if (lost_quotas && !have_uquotino && !have_gquotino)  {
                if (!no_modify)  {
                        do_warn(
        "Warning:  no quota inodes were found.  Quotas disabled.\n");
@@ -519,17 +519,17 @@ main(int argc, char **argv)
                        }
                }
 
-               if (lost_pquotino)  {
+               if (lost_gquotino)  {
                        if (!no_modify)  {
                                do_warn(
-               "Warning:  project quota information was cleared.\n");
+               "Warning:  group quota information was cleared.\n");
                                do_warn(
-"Project quotas can not be enforced until limit information is recreated.\n");
+"Group quotas can not be enforced until limit information is recreated.\n");
                        } else  {
                                do_warn(
-               "Warning:  project quota information would be cleared.\n");
+               "Warning:  group quota information would be cleared.\n");
                                do_warn(
-"Project quotas could not be enforced until limit information was recreated.\n");
+"Group quotas could not be enforced until limit information was recreated.\n");
                        }
                }
        }
@@ -552,10 +552,10 @@ main(int argc, char **argv)
 
        sb = XFS_BUF_TO_SBP(sbp);
 
-       if (sb->sb_qflags & (XFS_UQUOTA_CHKD|XFS_PQUOTA_CHKD))  {
+       if (sb->sb_qflags & (XFS_UQUOTA_CHKD|XFS_GQUOTA_CHKD))  {
                do_warn(
                "Note - quota info will be regenerated on next quota mount.\n");
-               sb->sb_qflags &= ~(XFS_UQUOTA_CHKD|XFS_PQUOTA_CHKD);
+               sb->sb_qflags &= ~(XFS_UQUOTA_CHKD|XFS_GQUOTA_CHKD);
        }
 
        if (clear_sunit) {