From: Nathan Scott Date: Tue, 3 Apr 2001 02:52:38 +0000 (+0000) Subject: move to version 1.2.0 for group quota changes. X-Git-Tag: v1.2.0 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b36eef04fbfdc4d2cd43539f87a3701045305a5f;p=thirdparty%2Fxfsprogs-dev.git move to version 1.2.0 for group quota changes. --- diff --git a/VERSION b/VERSION index 914aa3026..bfa363efc 100644 --- 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 diff --git a/db/check.c b/db/check.c index b40442206..8bfc99e6c 100644 --- a/db/check.c +++ b/db/check.c @@ -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 diff --git a/db/dquot.c b/db/dquot.c index be22d81e1..dc845381c 100644 --- a/db/dquot.c +++ b/db/dquot.c @@ -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; diff --git a/db/frag.c b/db/frag.c index 100d11aa8..59991f627 100644 --- 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; diff --git a/db/inode.c b/db/inode.c index a12e32fe3..3b6c3df2a 100644 --- a/db/inode.c +++ b/db/inode.c @@ -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 dc40b7dd5..8bdaf60c4 100644 --- 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 }, diff --git a/debian/changelog b/debian/changelog index 375a932fe..c0a161ac4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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) diff --git a/doc/CHANGES b/doc/CHANGES index 2c3acd211..a55524cff 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,5 +1,10 @@ +xfsprogs-1.2.0 (1 April 2001) + - support for group quota added + - some headers updated, in particular + - 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 diff --git a/doc/README.quota b/doc/README.quota index da0fa4a97..c563002f0 100644 --- a/doc/README.quota +++ b/doc/README.quota @@ -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"). diff --git a/include/xfs_buf_item.h b/include/xfs_buf_item.h index 5d097f8e3..15ad26a86 100644 --- a/include/xfs_buf_item.h +++ b/include/xfs_buf_item.h @@ -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 diff --git a/include/xfs_dqblk.h b/include/xfs_dqblk.h index ec1704d86..145770c53 100644 --- a/include/xfs_dqblk.h +++ b/include/xfs_dqblk.h @@ -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) diff --git a/include/xfs_dquot_item.h b/include/xfs_dquot_item.h index f8d9049a0..f4a6d10aa 100644 --- a/include/xfs_dquot_item.h +++ b/include/xfs_dquot_item.h @@ -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; diff --git a/include/xfs_inode.h b/include/xfs_inode.h index cb0b0ac13..f6385fd44 100644 --- a/include/xfs_inode.h +++ b/include/xfs_inode.h @@ -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)*/ diff --git a/include/xfs_quota.h b/include/xfs_quota.h index 794b90ee2..2dd83faa7 100644 --- a/include/xfs_quota.h +++ b/include/xfs_quota.h @@ -33,15 +33,15 @@ #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 diff --git a/include/xfs_sb.h b/include/xfs_sb.h index 6526d107e..f015bee13 100644 --- a/include/xfs_sb.h +++ b/include/xfs_sb.h @@ -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) /* diff --git a/include/xqm.h b/include/xqm.h index d4390389c..07b9181d4 100644 --- a/include/xqm.h +++ b/include/xqm.h @@ -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 */ diff --git a/libxfs/xfs_bmap.c b/libxfs/xfs_bmap.c index 88e597e72..3e61ca9be 100644 --- a/libxfs/xfs_bmap.c +++ b/libxfs/xfs_bmap.c @@ -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); diff --git a/libxfs/xfs_bmap_btree.c b/libxfs/xfs_bmap_btree.c index a221892e4..68c187760 100644 --- a/libxfs/xfs_bmap_btree.c +++ b/libxfs/xfs_bmap_btree.c @@ -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); diff --git a/libxfs/xfs_mount.c b/libxfs/xfs_mount.c index c4de3b9d2..61ab1ee77 100644 --- a/libxfs/xfs_mount.c +++ b/libxfs/xfs_mount.c @@ -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 }, diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c index a1a81cc99..b0a0e4105 100644 --- a/logprint/log_print_all.c +++ b/logprint/log_print_all.c @@ -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); } diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c index 3a4650cfb..5c4833251 100644 --- a/mkfs/xfs_mkfs.c +++ b/mkfs/xfs_mkfs.c @@ -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; diff --git a/repair/agheader.c b/repair/agheader.c index 0a4200f7c..40ed713be 100644 --- a/repair/agheader.c +++ b/repair/agheader.c @@ -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; diff --git a/repair/dinode.c b/repair/dinode.c index 2dcd98298..a1f372b8a 100644 --- a/repair/dinode.c +++ b/repair/dinode.c @@ -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); } diff --git a/repair/dir.c b/repair/dir.c index 4854b54e5..ee5a40154 100644 --- a/repair/dir.c +++ b/repair/dir.c @@ -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( diff --git a/repair/dir2.c b/repair/dir2.c index e2675df9b..4074800b1 100644 --- a/repair/dir2.c +++ b/repair/dir2.c @@ -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 diff --git a/repair/globals.h b/repair/globals.h index 5c33d5f6f..708c69ec5 100644 --- a/repair/globals.h +++ b/repair/globals.h @@ -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; diff --git a/repair/phase4.c b/repair/phase4.c index d3e0bd10d..3984430b3 100644 --- a/repair/phase4.c +++ b/repair/phase4.c @@ -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; } } diff --git a/repair/phase6.c b/repair/phase6.c index 1babc07c9..db2dd98f0 100644 --- a/repair/phase6.c +++ b/repair/phase6.c @@ -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); } diff --git a/repair/sb.c b/repair/sb.c index 5133f2063..f4a072e93 100644 --- a/repair/sb.c +++ b/repair/sb.c @@ -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; diff --git a/repair/versions.c b/repair/versions.c index 526be2221..46b758ba6 100644 --- a/repair/versions.c +++ b/repair/versions.c @@ -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; } } diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c index 9f3203156..951e3b930 100644 --- a/repair/xfs_repair.c +++ b/repair/xfs_repair.c @@ -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) {