All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together
@ 2013-08-01 19:24 Chandra Seetharaman
  2013-08-01 19:25 ` [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Chandra Seetharaman @ 2013-08-01 19:24 UTC (permalink / raw)
  To: xfs

Hello All,

These two patches make the relevant user space changes to support
the gquota/pquota in kernel.

It applies cleanly on crc-dev branch of xfsprogs.

Regards,

Chandra

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD
  2013-08-01 19:24 [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Chandra Seetharaman
@ 2013-08-01 19:25 ` Chandra Seetharaman
  2013-08-14 19:02   ` Rich Johnston
  2013-08-14 21:27   ` Rich Johnston
  2013-08-01 19:25 ` [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock Chandra Seetharaman
  2013-08-02  1:50 ` [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Dave Chinner
  2 siblings, 2 replies; 10+ messages in thread
From: Chandra Seetharaman @ 2013-08-01 19:25 UTC (permalink / raw)
  To: xfs; +Cc: Chandra Seetharaman

Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD. Instead,
start using XFS_GQUOTA_.* XFS_PQUOTA_.* counterparts.

On disk version still uses XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
 db/check.c          |    8 +++---
 include/xfs_quota.h |   59 ++++++++++++++++++++++++++------------------------
 libxfs/xfs_mount.c  |   52 ++++++++++++++++++++++++++++++++++++++++++++
 repair/versions.c   |   18 +++------------
 repair/xfs_repair.c |    5 +--
 5 files changed, 93 insertions(+), 49 deletions(-)

diff --git a/db/check.c b/db/check.c
index d490f81..d66dc68 100644
--- a/db/check.c
+++ b/db/check.c
@@ -2851,11 +2851,11 @@ process_inode(
 			process_quota(IS_USER_QUOTA, 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_OQUOTA_CHKD))
+			 (mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD))
 			process_quota(IS_GROUP_QUOTA, id, blkmap);
 		else if (id->ino == mp->m_sb.sb_gquotino &&
 			 (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) &&
-			 (mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD))
+			 (mp->m_sb.sb_qflags & XFS_PQUOTA_CHKD))
 			process_quota(IS_PROJECT_QUOTA, id, blkmap);
 	}
 	if (blkmap)
@@ -3623,11 +3623,11 @@ quota_init(void)
 	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_OQUOTA_CHKD);
+	       (mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD);
 	qpdo = mp->m_sb.sb_gquotino != 0 &&
 	       mp->m_sb.sb_gquotino != NULLFSINO &&
 	       (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) &&
-	       (mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD);
+	       (mp->m_sb.sb_qflags & XFS_PQUOTA_CHKD);
 	if (qudo)
 		qudata = xcalloc(QDATA_HASH_SIZE, sizeof(qdata_t *));
 	if (qgdo)
diff --git a/include/xfs_quota.h b/include/xfs_quota.h
index c61e31c..3ac9da5 100644
--- a/include/xfs_quota.h
+++ b/include/xfs_quota.h
@@ -159,30 +159,51 @@ typedef struct xfs_qoff_logformat {
 #define XFS_GQUOTA_ACCT	0x0040  /* group quota accounting ON */
 
 /*
+ * Start differentiating group quota and project quota in-core
+ * using distinct flags, instead of using the combined OQUOTA flags.
+ *
+ * Conversion to and from the combined OQUOTA flag (if necessary)
+ * is done only in xfs_sb_{to,from}_disk()
+ */
+#define XFS_GQUOTA_ENFD 0x0080  /* group quota limits enforced */
+#define XFS_GQUOTA_CHKD 0x0100  /* quotacheck run on group quotas */
+#define XFS_PQUOTA_ENFD 0x0200  /* project quota limits enforced */
+#define XFS_PQUOTA_CHKD 0x0400  /* quotacheck run on project quotas */
+
+#define XFS_MOUNT_QUOTA_ALL	(XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|\
+				 XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|\
+				 XFS_GQUOTA_ENFD|XFS_GQUOTA_CHKD|\
+				 XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD|\
+				 XFS_PQUOTA_CHKD)
+
+/*
  * Quota Accounting/Enforcement flags
  */
 #define XFS_ALL_QUOTA_ACCT	\
 		(XFS_UQUOTA_ACCT | XFS_GQUOTA_ACCT | XFS_PQUOTA_ACCT)
-#define XFS_ALL_QUOTA_ENFD	(XFS_UQUOTA_ENFD | XFS_OQUOTA_ENFD)
-#define XFS_ALL_QUOTA_CHKD	(XFS_UQUOTA_CHKD | XFS_OQUOTA_CHKD)
+#define XFS_ALL_QUOTA_ENFD	\
+		(XFS_UQUOTA_ENFD | XFS_GQUOTA_ENFD | XFS_PQUOTA_ENFD)
+#define XFS_ALL_QUOTA_CHKD	\
+		(XFS_UQUOTA_CHKD | XFS_GQUOTA_CHKD | XFS_PQUOTA_CHKD)
 
 #define XFS_IS_QUOTA_RUNNING(mp)	((mp)->m_qflags & XFS_ALL_QUOTA_ACCT)
 #define XFS_IS_UQUOTA_RUNNING(mp)	((mp)->m_qflags & XFS_UQUOTA_ACCT)
-#define XFS_IS_PQUOTA_RUNNING(mp)	((mp)->m_qflags & XFS_PQUOTA_ACCT)
 #define XFS_IS_GQUOTA_RUNNING(mp)	((mp)->m_qflags & XFS_GQUOTA_ACCT)
+#define XFS_IS_PQUOTA_RUNNING(mp)	((mp)->m_qflags & XFS_PQUOTA_ACCT)
 #define XFS_IS_UQUOTA_ENFORCED(mp)	((mp)->m_qflags & XFS_UQUOTA_ENFD)
-#define XFS_IS_OQUOTA_ENFORCED(mp)	((mp)->m_qflags & XFS_OQUOTA_ENFD)
+#define XFS_IS_GQUOTA_ENFORCED(mp)	((mp)->m_qflags & XFS_GQUOTA_ENFD)
+#define XFS_IS_PQUOTA_ENFORCED(mp)	((mp)->m_qflags & XFS_PQUOTA_ENFD)
 
 /*
  * 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	0x0100  /* uquotas are being turned off */
-#define XFS_PQUOTA_ACTIVE	0x0200  /* pquotas are being turned off */
-#define XFS_GQUOTA_ACTIVE	0x0400  /* gquotas are being turned off */
+#define XFS_UQUOTA_ACTIVE	0x1000  /* uquotas are being turned off */
+#define XFS_GQUOTA_ACTIVE	0x4000  /* gquotas are being turned off */
+#define XFS_PQUOTA_ACTIVE	0x2000  /* pquotas are being turned off */
 #define XFS_ALL_QUOTA_ACTIVE	\
-	(XFS_UQUOTA_ACTIVE | XFS_PQUOTA_ACTIVE | XFS_GQUOTA_ACTIVE)
+	(XFS_UQUOTA_ACTIVE | XFS_GQUOTA_ACTIVE | XFS_PQUOTA_ACTIVE)
 
 /*
  * Checking XFS_IS_*QUOTA_ON() while holding any inode lock guarantees
@@ -191,8 +212,6 @@ typedef struct xfs_qoff_logformat {
 #define XFS_IS_QUOTA_ON(mp)	((mp)->m_qflags & (XFS_UQUOTA_ACTIVE | \
 						   XFS_GQUOTA_ACTIVE | \
 						   XFS_PQUOTA_ACTIVE))
-#define XFS_IS_OQUOTA_ON(mp)	((mp)->m_qflags & (XFS_GQUOTA_ACTIVE | \
-						   XFS_PQUOTA_ACTIVE))
 #define XFS_IS_UQUOTA_ON(mp)	((mp)->m_qflags & XFS_UQUOTA_ACTIVE)
 #define XFS_IS_GQUOTA_ON(mp)	((mp)->m_qflags & XFS_GQUOTA_ACTIVE)
 #define XFS_IS_PQUOTA_ON(mp)	((mp)->m_qflags & XFS_PQUOTA_ACTIVE)
@@ -266,25 +285,9 @@ typedef struct xfs_qoff_logformat {
 	((XFS_IS_UQUOTA_ON(mp) && \
 		(mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD) == 0) || \
 	 (XFS_IS_GQUOTA_ON(mp) && \
-		((mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD) == 0 || \
-		 (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT))) || \
+		(mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD) == 0) || \
 	 (XFS_IS_PQUOTA_ON(mp) && \
-		((mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD) == 0 || \
-		 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT))))
-
-#define XFS_MOUNT_QUOTA_SET1	(XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|\
-				 XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|\
-				 XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD)
-
-#define XFS_MOUNT_QUOTA_SET2	(XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|\
-				 XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|\
-				 XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD)
-
-#define XFS_MOUNT_QUOTA_ALL	(XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|\
-				 XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|\
-				 XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD|\
-				 XFS_GQUOTA_ACCT)
-
+		(mp->m_sb.sb_qflags & XFS_PQUOTA_CHKD) == 0))
 
 /*
  * The structure kept inside the xfs_trans_t keep track of dquot changes
diff --git a/libxfs/xfs_mount.c b/libxfs/xfs_mount.c
index db3785d..e7a9003 100644
--- a/libxfs/xfs_mount.c
+++ b/libxfs/xfs_mount.c
@@ -179,6 +179,14 @@ xfs_mount_validate_sb(
 		}
 	}
 
+	if ((sbp->sb_qflags & (XFS_OQUOTA_ENFD | XFS_OQUOTA_CHKD)) &&
+			(sbp->sb_qflags & (XFS_PQUOTA_ENFD | XFS_GQUOTA_ENFD |
+				XFS_PQUOTA_CHKD | XFS_GQUOTA_CHKD))) {
+		xfs_warn(mp,
+"Super block has XFS_OQUOTA bits along with XFS_PQUOTA and/or XFS_GQUOTA bits.\n");
+		return XFS_ERROR(EFSCORRUPTED);
+	}
+
 	if (unlikely(
 	    sbp->sb_logstart == 0 && mp->m_logdev_targp == mp->m_ddev_targp)) {
 		xfs_warn(mp,
@@ -315,6 +323,47 @@ xfs_sb_from_disk(
 	to->sb_lsn = be64_to_cpu(from->sb_lsn);
 }
 
+static void
+xfs_sb_quota_from_disk(struct xfs_sb *sbp)
+{
+	if (sbp->sb_qflags & XFS_OQUOTA_ENFD)
+		sbp->sb_qflags |= (sbp->sb_qflags & XFS_PQUOTA_ACCT) ?
+					XFS_PQUOTA_ENFD : XFS_GQUOTA_ENFD;
+	if (sbp->sb_qflags & XFS_OQUOTA_CHKD)
+		sbp->sb_qflags |= (sbp->sb_qflags & XFS_PQUOTA_ACCT) ?
+					XFS_PQUOTA_CHKD : XFS_GQUOTA_CHKD;
+	sbp->sb_qflags &= ~(XFS_OQUOTA_ENFD | XFS_OQUOTA_CHKD);
+}
+
+static inline void
+xfs_sb_quota_to_disk(
+	xfs_dsb_t	*to,
+	xfs_sb_t	*from,
+	__int64_t	*fields)
+{
+	__uint16_t	qflags = from->sb_qflags;
+
+	if (*fields & XFS_SB_QFLAGS) {
+		/*
+		 * The in-core version of sb_qflags do not have
+		 * XFS_OQUOTA_* flags, whereas the on-disk version
+		 * does.  So, convert incore XFS_{PG}QUOTA_* flags
+		 * to on-disk XFS_OQUOTA_* flags.
+		 */
+		qflags &= ~(XFS_PQUOTA_ENFD | XFS_PQUOTA_CHKD |
+				XFS_GQUOTA_ENFD | XFS_GQUOTA_CHKD);
+
+		if (from->sb_qflags &
+				(XFS_PQUOTA_ENFD | XFS_GQUOTA_ENFD))
+			qflags |= XFS_OQUOTA_ENFD;
+		if (from->sb_qflags &
+				(XFS_PQUOTA_CHKD | XFS_GQUOTA_CHKD))
+			qflags |= XFS_OQUOTA_CHKD;
+		to->sb_qflags = cpu_to_be16(qflags);
+		*fields &= ~XFS_SB_QFLAGS;
+	}
+}
+
 /*
  * Copy in core superblock to ondisk one.
  *
@@ -336,6 +385,7 @@ xfs_sb_to_disk(
 	if (!fields)
 		return;
 
+	xfs_sb_quota_to_disk(to, from, &fields);
 	while (fields) {
 		f = (xfs_sb_field_t)xfs_lowbit64((__uint64_t)fields);
 		first = xfs_sb_info[f].offset;
@@ -378,6 +428,8 @@ xfs_sb_verify(
 
 	xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp));
 
+	xfs_sb_quota_from_disk(&sb);
+
 	/*
 	 * Only check the in progress field for the primary superblock as
 	 * mkfs.xfs doesn't clear it from secondary superblocks.
diff --git a/repair/versions.c b/repair/versions.c
index c11a728..b65747a 100644
--- a/repair/versions.c
+++ b/repair/versions.c
@@ -61,26 +61,16 @@ 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_GQUOTA_ACCT|
-				XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD|
-				XFS_PQUOTA_ACCT))  {
+		if (sb->sb_qflags & ~XFS_MOUNT_QUOTA_ALL) {
 			/*
 			 * update the incore superblock, if we're in
 			 * no_modify mode, it'll never get flushed out
 			 * so this is ok.
 			 */
 			do_warn(_("bogus quota flags 0x%x set in superblock"),
-				sb->sb_qflags & ~(XFS_UQUOTA_ACCT|
-				XFS_UQUOTA_ENFD|
-				XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|
-				XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD|
-				XFS_PQUOTA_ACCT));
+				sb->sb_qflags & ~XFS_MOUNT_QUOTA_ALL);
 
-			sb->sb_qflags &= (XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD|
-				XFS_UQUOTA_CHKD|XFS_GQUOTA_ACCT|
-				XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD|
-				XFS_PQUOTA_ACCT);
+			sb->sb_qflags &= XFS_MOUNT_QUOTA_ALL;
 
 			if (!no_modify)
 				do_warn(_(", bogus flags will be cleared\n"));
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index 4708c5c..ab06201 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -852,11 +852,10 @@ _("Warning:  project quota information would be cleared.\n"
 
 	dsb = XFS_BUF_TO_SBP(sbp);
 
-	if (be16_to_cpu(dsb->sb_qflags) & (XFS_UQUOTA_CHKD | XFS_OQUOTA_CHKD)) {
+	if (be16_to_cpu(dsb->sb_qflags) & XFS_ALL_QUOTA_CHKD) {
 		do_warn(_("Note - quota info will be regenerated on next "
 			"quota mount.\n"));
-		dsb->sb_qflags &= cpu_to_be16(~(XFS_UQUOTA_CHKD |
-							XFS_OQUOTA_CHKD));
+		dsb->sb_qflags &= cpu_to_be16(~XFS_ALL_QUOTA_CHKD);
 	}
 
 	if (clear_sunit) {
-- 
1.7.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock
  2013-08-01 19:24 [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Chandra Seetharaman
  2013-08-01 19:25 ` [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
@ 2013-08-01 19:25 ` Chandra Seetharaman
  2013-08-14 19:03   ` Rich Johnston
  2013-08-14 21:27   ` Rich Johnston
  2013-08-02  1:50 ` [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Dave Chinner
  2 siblings, 2 replies; 10+ messages in thread
From: Chandra Seetharaman @ 2013-08-01 19:25 UTC (permalink / raw)
  To: xfs; +Cc: Chandra Seetharaman

Start using the new field sb_pquotino from the on-disk superblock if the
version of the superblock supports separate pquotino.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
 db/check.c          |   12 +++++++-----
 db/dquot.c          |   11 +++++++----
 db/frag.c           |    3 ++-
 db/inode.c          |    3 ++-
 db/metadump.c       |    5 ++++-
 include/xfs_sb.h    |    5 +++++
 libxfs/xfs_mount.c  |   42 ++++++++++++++++++++++++++++++++++++++++++
 mkfs/xfs_mkfs.c     |    2 +-
 repair/agheader.c   |   13 +++++++++++++
 repair/dinode.c     |    9 +++++++++
 repair/dir2.c       |    5 +++++
 repair/globals.h    |    1 +
 repair/phase4.c     |   29 ++++++++++++++++++++++-------
 repair/phase6.c     |    9 +++++++++
 repair/sb.c         |    3 +++
 repair/versions.c   |    5 +++++
 repair/xfs_repair.c |    2 +-
 17 files changed, 138 insertions(+), 21 deletions(-)

diff --git a/db/check.c b/db/check.c
index d66dc68..cbe55ba 100644
--- a/db/check.c
+++ b/db/check.c
@@ -1835,7 +1835,8 @@ 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_gquotino && mp->m_sb.sb_gquotino != NULLFSINO))
+	    (mp->m_sb.sb_gquotino && mp->m_sb.sb_gquotino != NULLFSINO) ||
+	    (mp->m_sb.sb_pquotino && mp->m_sb.sb_pquotino != NULLFSINO))
 		sbversion |= XFS_SB_VERSION_QUOTABIT;
 	quota_init();
 	return 1;
@@ -2732,7 +2733,8 @@ process_inode(
 			addlink_inode(id);
 		}
 		else if (id->ino == mp->m_sb.sb_uquotino ||
-			 id->ino == mp->m_sb.sb_gquotino) {
+			 id->ino == mp->m_sb.sb_gquotino ||
+			 id->ino == mp->m_sb.sb_pquotino) {
 			type = DBM_QUOTA;
 			blkmap = blkmap_alloc(idic.di_nextents);
 			addlink_inode(id);
@@ -2853,7 +2855,7 @@ process_inode(
 			 (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) &&
 			 (mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD))
 			process_quota(IS_GROUP_QUOTA, id, blkmap);
-		else if (id->ino == mp->m_sb.sb_gquotino &&
+		else if (id->ino == mp->m_sb.sb_pquotino &&
 			 (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) &&
 			 (mp->m_sb.sb_qflags & XFS_PQUOTA_CHKD))
 			process_quota(IS_PROJECT_QUOTA, id, blkmap);
@@ -3624,8 +3626,8 @@ quota_init(void)
 	       mp->m_sb.sb_gquotino != NULLFSINO &&
 	       (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT) &&
 	       (mp->m_sb.sb_qflags & XFS_GQUOTA_CHKD);
-	qpdo = mp->m_sb.sb_gquotino != 0 &&
-	       mp->m_sb.sb_gquotino != NULLFSINO &&
+	qpdo = mp->m_sb.sb_pquotino != 0 &&
+	       mp->m_sb.sb_pquotino != NULLFSINO &&
 	       (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT) &&
 	       (mp->m_sb.sb_qflags & XFS_PQUOTA_CHKD);
 	if (qudo)
diff --git a/db/dquot.c b/db/dquot.c
index 35eb0bd..6927956 100644
--- a/db/dquot.c
+++ b/db/dquot.c
@@ -133,10 +133,13 @@ dquot_f(
 		dbprintf(_("dquot command requires one %s id argument\n"), s);
 		return 0;
 	}
-	ino = (dogrp || doprj) ? mp->m_sb.sb_gquotino : mp->m_sb.sb_uquotino;
-	if (ino == 0 || ino == NULLFSINO ||
-	    (dogrp && (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT)) ||
-	    (doprj && (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT))) {
+	ino = mp->m_sb.sb_uquotino;
+	if (doprj)
+		ino = mp->m_sb.sb_pquotino;
+	else if (dogrp)
+		ino = mp->m_sb.sb_gquotino;
+
+	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 23ccfa5..2eb33d8 100644
--- a/db/frag.c
+++ b/db/frag.c
@@ -326,7 +326,8 @@ process_inode(
 			skipd = 1;
 		else if (!qflag &&
 			 (ino == mp->m_sb.sb_uquotino ||
-			  ino == mp->m_sb.sb_gquotino))
+			  ino == mp->m_sb.sb_gquotino ||
+			  ino == mp->m_sb.sb_pquotino))
 			skipd = 1;
 		else
 			skipd = !fflag;
diff --git a/db/inode.c b/db/inode.c
index 68ef564..eafbbd5 100644
--- a/db/inode.c
+++ b/db/inode.c
@@ -438,7 +438,8 @@ 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_gquotino)
+			 iocur_top->ino == mp->m_sb.sb_gquotino ||
+			 iocur_top->ino == mp->m_sb.sb_pquotino)
 			return TYP_DQBLK;
 		else
 			return TYP_DATA;
diff --git a/db/metadump.c b/db/metadump.c
index 1c8020b..a170bb5 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -1976,7 +1976,10 @@ copy_sb_inodes(void)
 	if (!copy_ino(mp->m_sb.sb_uquotino, TYP_DQBLK))
 		return 0;
 
-	return copy_ino(mp->m_sb.sb_gquotino, TYP_DQBLK);
+	if (!copy_ino(mp->m_sb.sb_gquotino, TYP_DQBLK))
+		return 0;
+
+	return copy_ino(mp->m_sb.sb_pquotino, TYP_DQBLK);
 }
 
 static int
diff --git a/include/xfs_sb.h b/include/xfs_sb.h
index 51db6f2..4a710d6 100644
--- a/include/xfs_sb.h
+++ b/include/xfs_sb.h
@@ -625,6 +625,11 @@ xfs_sb_has_incompat_log_feature(
 	return (sbp->sb_features_log_incompat & feature) != 0;
 }
 
+static inline int xfs_sb_version_has_pquotino(xfs_sb_t *sbp)
+{
+	return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5;
+}
+
 /*
  * end of superblock version macros
  */
diff --git a/libxfs/xfs_mount.c b/libxfs/xfs_mount.c
index e7a9003..8b267bc 100644
--- a/libxfs/xfs_mount.c
+++ b/libxfs/xfs_mount.c
@@ -326,6 +326,13 @@ xfs_sb_from_disk(
 static void
 xfs_sb_quota_from_disk(struct xfs_sb *sbp)
 {
+	/*
+	 * We need to do these manipilations only if we are working
+	 * with an older version of on-disk superblock.
+	 */
+	if (xfs_sb_version_has_pquotino(sbp))
+		return;
+
 	if (sbp->sb_qflags & XFS_OQUOTA_ENFD)
 		sbp->sb_qflags |= (sbp->sb_qflags & XFS_PQUOTA_ACCT) ?
 					XFS_PQUOTA_ENFD : XFS_GQUOTA_ENFD;
@@ -333,6 +340,18 @@ xfs_sb_quota_from_disk(struct xfs_sb *sbp)
 		sbp->sb_qflags |= (sbp->sb_qflags & XFS_PQUOTA_ACCT) ?
 					XFS_PQUOTA_CHKD : XFS_GQUOTA_CHKD;
 	sbp->sb_qflags &= ~(XFS_OQUOTA_ENFD | XFS_OQUOTA_CHKD);
+
+	if (sbp->sb_qflags & XFS_PQUOTA_ACCT)  {
+		/*
+		 * In older version of superblock, on-disk superblock only
+		 * has sb_gquotino, and in-core superblock has both sb_gquotino
+		 * and sb_pquotino. But, only one of them is supported at any
+		 * point of time. So, if PQUOTA is set in disk superblock,
+		 * copy over sb_gquotino to sb_pquotino.
+		 */
+		sbp->sb_pquotino = sbp->sb_gquotino;
+		sbp->sb_gquotino = NULLFSINO;
+	}
 }
 
 static inline void
@@ -343,6 +362,13 @@ xfs_sb_quota_to_disk(
 {
 	__uint16_t	qflags = from->sb_qflags;
 
+	/*
+	 * We need to do these manipilations only if we are working
+	 * with an older version of on-disk superblock.
+	 */
+	if (xfs_sb_version_has_pquotino(from))
+		return;
+
 	if (*fields & XFS_SB_QFLAGS) {
 		/*
 		 * The in-core version of sb_qflags do not have
@@ -362,6 +388,21 @@ xfs_sb_quota_to_disk(
 		to->sb_qflags = cpu_to_be16(qflags);
 		*fields &= ~XFS_SB_QFLAGS;
 	}
+
+	/*
+	 * GQUOTINO and PQUOTINO cannot be used together in versions
+	 * of superblock that do not have pquotino. from->sb_flags
+	 * tells us which quota is active and should be copied to
+	 * disk.
+	 */
+	if ((*fields & XFS_SB_GQUOTINO) &&
+				(from->sb_qflags & XFS_GQUOTA_ACCT))
+		to->sb_gquotino = cpu_to_be64(from->sb_gquotino);
+	else if ((*fields & XFS_SB_PQUOTINO) &&
+				(from->sb_qflags & XFS_PQUOTA_ACCT))
+		to->sb_gquotino = cpu_to_be64(from->sb_pquotino);
+
+	*fields &= ~(XFS_SB_PQUOTINO | XFS_SB_GQUOTINO);
 }
 
 /*
@@ -386,6 +427,7 @@ xfs_sb_to_disk(
 		return;
 
 	xfs_sb_quota_to_disk(to, from, &fields);
+
 	while (fields) {
 		f = (xfs_sb_field_t)xfs_lowbit64((__uint64_t)fields);
 		first = xfs_sb_info[f].offset;
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index bb5d8d4..4bdacee 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2477,7 +2477,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
 	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_gquotino = 0;
+	sbp->sb_uquotino = sbp->sb_gquotino = sbp->sb_pquotino = 0;
 	sbp->sb_qflags = 0;
 	sbp->sb_unit = dsunit;
 	sbp->sb_width = dswidth;
diff --git a/repair/agheader.c b/repair/agheader.c
index bc8b1bf..76a2ce1 100644
--- a/repair/agheader.c
+++ b/repair/agheader.c
@@ -362,6 +362,19 @@ 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 (!no_modify)
+			sb->sb_pquotino = 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"),
+				i);
+
+		} else
+			rval |= XR_AG_SB_SEC;
+	}
+
 	if (sb->sb_inprogress == 1 && sb->sb_qflags)  {
 		if (!no_modify)
 			sb->sb_qflags = 0;
diff --git a/repair/dinode.c b/repair/dinode.c
index b0f1396..ed0ca37 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -1812,6 +1812,15 @@ process_check_sb_inodes(
 		}
 		return 0;
 	}
+	if (lino == mp->m_sb.sb_pquotino)  {
+		if (*type != XR_INO_DATA)  {
+			do_warn(_("project quota inode %" PRIu64 " has bad type 0x%x\n"),
+				lino, dinode_fmt(dinoc));
+			mp->m_sb.sb_pquotino = NULLFSINO;
+			return 1;
+		}
+		return 0;
+	}
 	if (lino == mp->m_sb.sb_rsumino) {
 		if (*type != XR_INO_RTSUM) {
 			do_warn(
diff --git a/repair/dir2.c b/repair/dir2.c
index 2ca7fd1..05bd4b7 100644
--- a/repair/dir2.c
+++ b/repair/dir2.c
@@ -817,6 +817,9 @@ process_sf_dir2(
 		} else if (lino == mp->m_sb.sb_gquotino)  {
 			junkit = 1;
 			junkreason = _("group quota");
+		} else if (lino == mp->m_sb.sb_pquotino)  {
+			junkit = 1;
+			junkreason = _("project quota");
 		} else if ((irec_p = find_inode_rec(mp,
 					XFS_INO_TO_AGNO(mp, lino),
 					XFS_INO_TO_AGINO(mp, lino))) != NULL) {
@@ -1332,6 +1335,8 @@ process_dir2_data(
 			clearreason = _("user quota");
 		} else if (ent_ino == mp->m_sb.sb_gquotino) {
 			clearreason = _("group quota");
+		} else if (ent_ino == mp->m_sb.sb_pquotino) {
+			clearreason = _("project quota");
 		} else {
 			irec_p = find_inode_rec(mp,
 						XFS_INO_TO_AGNO(mp, ent_ino),
diff --git a/repair/globals.h b/repair/globals.h
index e01e4e9..aef8b79 100644
--- a/repair/globals.h
+++ b/repair/globals.h
@@ -137,6 +137,7 @@ EXTERN int		need_rsumino;
 EXTERN int		lost_quotas;
 EXTERN int		have_uquotino;
 EXTERN int		have_gquotino;
+EXTERN int		have_pquotino;
 EXTERN int		lost_uquotino;
 EXTERN int		lost_gquotino;
 EXTERN int		lost_pquotino;
diff --git a/repair/phase4.c b/repair/phase4.c
index a6c7a5e..a822aaa 100644
--- a/repair/phase4.c
+++ b/repair/phase4.c
@@ -71,12 +71,25 @@ quotino_check(xfs_mount_t *mp)
 		if (irec == NULL || is_inode_free(irec,
 				mp->m_sb.sb_gquotino - irec->ino_startnum))  {
 			mp->m_sb.sb_gquotino = NULLFSINO;
-			if (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT)
-				lost_gquotino = 1;
-			else
-				lost_pquotino = 1;
+			lost_gquotino = 1;
 		} else
-			lost_gquotino = lost_pquotino = 0;
+			lost_gquotino = 0;
+	}
+
+	if (mp->m_sb.sb_pquotino != NULLFSINO && mp->m_sb.sb_pquotino != 0)  {
+		if (verify_inum(mp, mp->m_sb.sb_pquotino))
+			irec = NULL;
+		else
+			irec = find_inode_rec(mp,
+				XFS_INO_TO_AGNO(mp, mp->m_sb.sb_pquotino),
+				XFS_INO_TO_AGINO(mp, mp->m_sb.sb_pquotino));
+
+		if (irec == NULL || is_inode_free(irec,
+				mp->m_sb.sb_pquotino - irec->ino_startnum))  {
+			mp->m_sb.sb_pquotino = NULLFSINO;
+			lost_pquotino = 1;
+		} else
+			lost_pquotino = 0;
 	}
 }
 
@@ -104,11 +117,13 @@ 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_gquotino == NULLFSINO || mp->m_sb.sb_gquotino == 0))  {
+	    (mp->m_sb.sb_gquotino == NULLFSINO || mp->m_sb.sb_gquotino == 0) &&
+	    (mp->m_sb.sb_pquotino == NULLFSINO || mp->m_sb.sb_pquotino == 0))  {
 		lost_quotas = 1;
 		fs_quotas = 0;
 	} else if (!verify_inum(mp, mp->m_sb.sb_uquotino) &&
-			!verify_inum(mp, mp->m_sb.sb_gquotino)) {
+			!verify_inum(mp, mp->m_sb.sb_gquotino) &&
+			!verify_inum(mp, mp->m_sb.sb_pquotino)) {
 		fs_quotas = 1;
 	}
 }
diff --git a/repair/phase6.c b/repair/phase6.c
index 2905a1c..794753e 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -2783,6 +2783,15 @@ 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)  {
+			irec = find_inode_rec(mp, 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)
+					- irec->ino_startnum;
+			add_inode_reached(irec, offset);
+		}
 	}
 }
 
diff --git a/repair/sb.c b/repair/sb.c
index c7786b5..e2f5933 100644
--- a/repair/sb.c
+++ b/repair/sb.c
@@ -40,6 +40,7 @@ copy_sb(xfs_sb_t *source, xfs_sb_t *dest)
 	xfs_ino_t	rsumino;
 	xfs_ino_t	uquotino;
 	xfs_ino_t	gquotino;
+	xfs_ino_t	pquotino;
 	__uint16_t	versionnum;
 
 	rootino = dest->sb_rootino;
@@ -47,6 +48,7 @@ copy_sb(xfs_sb_t *source, xfs_sb_t *dest)
 	rsumino = dest->sb_rsumino;
 	uquotino = dest->sb_uquotino;
 	gquotino = dest->sb_gquotino;
+	pquotino = dest->sb_pquotino;
 
 	versionnum = dest->sb_versionnum;
 
@@ -57,6 +59,7 @@ copy_sb(xfs_sb_t *source, xfs_sb_t *dest)
 	dest->sb_rsumino = rsumino;
 	dest->sb_uquotino = uquotino;
 	dest->sb_gquotino = gquotino;
+	dest->sb_pquotino = pquotino;
 
 	dest->sb_versionnum = versionnum;
 
diff --git a/repair/versions.c b/repair/versions.c
index b65747a..c1dff72 100644
--- a/repair/versions.c
+++ b/repair/versions.c
@@ -117,6 +117,7 @@ parse_sb_version(xfs_sb_t *sb)
 	fs_has_extflgbit = 0;
 	have_uquotino = 0;
 	have_gquotino = 0;
+	have_pquotino = 0;
 	issue_warning = 0;
 
 	/*
@@ -253,6 +254,10 @@ _("WARNING:  you have disallowed quotas but this filesystem\n"
 			if (sb->sb_gquotino != 0 &&
 					sb->sb_gquotino != NULLFSINO)
 				have_gquotino = 1;
+
+			if (sb->sb_pquotino != 0 &&
+					sb->sb_pquotino != NULLFSINO)
+				have_pquotino = 1;
 		}
 	}
 
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index ab06201..820e7a2 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -775,7 +775,7 @@ main(int argc, char **argv)
 _("Inode allocation btrees are too corrupted, skipping phases 6 and 7\n"));
 	}
 
-	if (lost_quotas && !have_uquotino && !have_gquotino)  {
+	if (lost_quotas && !have_uquotino && !have_gquotino && !have_pquotino) {
 		if (!no_modify)  {
 			do_warn(
 _("Warning:  no quota inodes were found.  Quotas disabled.\n"));
-- 
1.7.1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together
  2013-08-01 19:24 [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Chandra Seetharaman
  2013-08-01 19:25 ` [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
  2013-08-01 19:25 ` [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock Chandra Seetharaman
@ 2013-08-02  1:50 ` Dave Chinner
  2013-08-02 20:40   ` Chandra Seetharaman
  2 siblings, 1 reply; 10+ messages in thread
From: Dave Chinner @ 2013-08-02  1:50 UTC (permalink / raw)
  To: Chandra Seetharaman; +Cc: xfs

On Thu, Aug 01, 2013 at 02:24:59PM -0500, Chandra Seetharaman wrote:
> Hello All,
> 
> These two patches make the relevant user space changes to support
> the gquota/pquota in kernel.
> 
> It applies cleanly on crc-dev branch of xfsprogs.

I think I've already brought all of the libxfs pquota changes across
in the series of patches I have that unified the kernel and
userspace code on top of the crc-dev branch....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together
  2013-08-02  1:50 ` [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Dave Chinner
@ 2013-08-02 20:40   ` Chandra Seetharaman
  2013-08-14 21:29     ` Rich Johnston
  0 siblings, 1 reply; 10+ messages in thread
From: Chandra Seetharaman @ 2013-08-02 20:40 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

On Fri, 2013-08-02 at 11:50 +1000, Dave Chinner wrote:
> On Thu, Aug 01, 2013 at 02:24:59PM -0500, Chandra Seetharaman wrote:
> > Hello All,
> > 
> > These two patches make the relevant user space changes to support
> > the gquota/pquota in kernel.
> > 
> > It applies cleanly on crc-dev branch of xfsprogs.
> 
> I think I've already brought all of the libxfs pquota changes across
> in the series of patches I have that unified the kernel and
> userspace code on top of the crc-dev branch....

Cool.

I just looked at your patches. Some of my changes are still not in those
patches.

I will rebase and post a new patchset once your patches are merged in.

Thanks

Chandra
> 
> Cheers,
> 
> Dave.


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD
  2013-08-01 19:25 ` [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
@ 2013-08-14 19:02   ` Rich Johnston
  2013-08-14 21:27   ` Rich Johnston
  1 sibling, 0 replies; 10+ messages in thread
From: Rich Johnston @ 2013-08-14 19:02 UTC (permalink / raw)
  To: Chandra Seetharaman; +Cc: xfs

On 08/01/2013 02:25 PM, Chandra Seetharaman wrote:
> Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD. Instead,
> start using XFS_GQUOTA_.* XFS_PQUOTA_.* counterparts.
>
> On disk version still uses XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD.
>
> Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> ---
>   db/check.c          |    8 +++---
>   include/xfs_quota.h |   59 ++++++++++++++++++++++++++------------------------
>   libxfs/xfs_mount.c  |   52 ++++++++++++++++++++++++++++++++++++++++++++
>   repair/versions.c   |   18 +++------------
>   repair/xfs_repair.c |    5 +--
>   5 files changed, 93 insertions(+), 49 deletions(-)
>

Looks good.

Reviewed-by: Rich Johnston <rjohnston@sgi.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock
  2013-08-01 19:25 ` [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock Chandra Seetharaman
@ 2013-08-14 19:03   ` Rich Johnston
  2013-08-14 21:27   ` Rich Johnston
  1 sibling, 0 replies; 10+ messages in thread
From: Rich Johnston @ 2013-08-14 19:03 UTC (permalink / raw)
  To: Chandra Seetharaman; +Cc: xfs

On 08/01/2013 02:25 PM, Chandra Seetharaman wrote:
> Start using the new field sb_pquotino from the on-disk superblock if the
> version of the superblock supports separate pquotino.
>
> Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> ---
>   db/check.c          |   12 +++++++-----
>   db/dquot.c          |   11 +++++++----
>   db/frag.c           |    3 ++-
>   db/inode.c          |    3 ++-
>   db/metadump.c       |    5 ++++-
>   include/xfs_sb.h    |    5 +++++
>   libxfs/xfs_mount.c  |   42 ++++++++++++++++++++++++++++++++++++++++++
>   mkfs/xfs_mkfs.c     |    2 +-
>   repair/agheader.c   |   13 +++++++++++++
>   repair/dinode.c     |    9 +++++++++
>   repair/dir2.c       |    5 +++++
>   repair/globals.h    |    1 +
>   repair/phase4.c     |   29 ++++++++++++++++++++++-------
>   repair/phase6.c     |    9 +++++++++
>   repair/sb.c         |    3 +++
>   repair/versions.c   |    5 +++++
>   repair/xfs_repair.c |    2 +-
>   17 files changed, 138 insertions(+), 21 deletions(-)
>
Looks good.

Reviewed-by: Rich Johnston <rjohnston@sgi.com>


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD
  2013-08-01 19:25 ` [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
  2013-08-14 19:02   ` Rich Johnston
@ 2013-08-14 21:27   ` Rich Johnston
  1 sibling, 0 replies; 10+ messages in thread
From: Rich Johnston @ 2013-08-14 21:27 UTC (permalink / raw)
  To: Chandra Seetharaman; +Cc: xfs

On 08/01/2013 02:25 PM, Chandra Seetharaman wrote:
> Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD. Instead,
> start using XFS_GQUOTA_.* XFS_PQUOTA_.* counterparts.
>
> On disk version still uses XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD.
>
> Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> ---
>   db/check.c          |    8 +++---
>   include/xfs_quota.h |   59 ++++++++++++++++++++++++++------------------------
>   libxfs/xfs_mount.c  |   52 ++++++++++++++++++++++++++++++++++++++++++++
>   repair/versions.c   |   18 +++------------
>   repair/xfs_repair.c |    5 +--
>   5 files changed, 93 insertions(+), 49 deletions(-)
>

Thanks for the patch Chandra, this has been committed.

--Rich

commit 342aef1ec0ecada8ba69ea73db10e20c4f9efdf4
Author: Chandra Seetharaman <sekharan@us.ibm.com>
Date:   Thu Aug 1 19:25:00 2013 +0000

     xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD

     Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD. Instead,
     start using XFS_GQUOTA_.* XFS_PQUOTA_.* counterparts.

     On disk version still uses XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD.

     Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
     Reviewed-by: Rich Johnston <rjohnston@sgi.com>
     Signed-off-by: Rich Johnston <rjohnston@sgi.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock
  2013-08-01 19:25 ` [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock Chandra Seetharaman
  2013-08-14 19:03   ` Rich Johnston
@ 2013-08-14 21:27   ` Rich Johnston
  1 sibling, 0 replies; 10+ messages in thread
From: Rich Johnston @ 2013-08-14 21:27 UTC (permalink / raw)
  To: Chandra Seetharaman; +Cc: xfs

On 08/01/2013 02:25 PM, Chandra Seetharaman wrote:
> Start using the new field sb_pquotino from the on-disk superblock if the
> version of the superblock supports separate pquotino.
>
> Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
> ---
>   db/check.c          |   12 +++++++-----
>   db/dquot.c          |   11 +++++++----
>   db/frag.c           |    3 ++-
>   db/inode.c          |    3 ++-
>   db/metadump.c       |    5 ++++-
>   include/xfs_sb.h    |    5 +++++
>   libxfs/xfs_mount.c  |   42 ++++++++++++++++++++++++++++++++++++++++++
>   mkfs/xfs_mkfs.c     |    2 +-
>   repair/agheader.c   |   13 +++++++++++++
>   repair/dinode.c     |    9 +++++++++
>   repair/dir2.c       |    5 +++++
>   repair/globals.h    |    1 +
>   repair/phase4.c     |   29 ++++++++++++++++++++++-------
>   repair/phase6.c     |    9 +++++++++
>   repair/sb.c         |    3 +++
>   repair/versions.c   |    5 +++++
>   repair/xfs_repair.c |    2 +-
>   17 files changed, 138 insertions(+), 21 deletions(-)
>

Thanks for the patch Chandra, this has been committed.

--Rich

commit 0340d706861a68205393b83e3a816e88383a05fa
Author: Chandra Seetharaman <sekharan@us.ibm.com>
Date:   Thu Aug 1 19:25:01 2013 +0000

     xfsprogs: Start using pquotaino from on-disk superblock

     Start using the new field sb_pquotino from the on-disk superblock 
if the
     version of the superblock supports separate pquotino.

     Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
     Reviewed-by: Rich Johnston <rjohnston@sgi.com>
     Signed-off-by: Rich Johnston <rjohnston@sgi.com>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together
  2013-08-02 20:40   ` Chandra Seetharaman
@ 2013-08-14 21:29     ` Rich Johnston
  0 siblings, 0 replies; 10+ messages in thread
From: Rich Johnston @ 2013-08-14 21:29 UTC (permalink / raw)
  To: sekharan; +Cc: xfs

On 08/02/2013 03:40 PM, Chandra Seetharaman wrote:
> On Fri, 2013-08-02 at 11:50 +1000, Dave Chinner wrote:
>> On Thu, Aug 01, 2013 at 02:24:59PM -0500, Chandra Seetharaman wrote:
>>> Hello All,
>>>
>>> These two patches make the relevant user space changes to support
>>> the gquota/pquota in kernel.
>>>
>>> It applies cleanly on crc-dev branch of xfsprogs.
>>
>> I think I've already brought all of the libxfs pquota changes across
>> in the series of patches I have that unified the kernel and
>> userspace code on top of the crc-dev branch....
>
> Cool.
>
> I just looked at your patches. Some of my changes are still not in those
> patches.
>
> I will rebase and post a new patchset once your patches are merged in.
>
> Thanks
>
> Chandra
>>
>> Cheers,
>>
>> Dave.
>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
This patch series looks good and applies cleanly to current xfsprogs 
tree. As the patchset mentioned above needs to be rebased and this 
series coincides with quota kernel patch series already reviewed and 
waiting one minor change, this series has been committed (0340d70 and 
342aef1).

--Rich

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-08-14 21:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-01 19:24 [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Chandra Seetharaman
2013-08-01 19:25 ` [PATCH 1/2] xfsprogs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD Chandra Seetharaman
2013-08-14 19:02   ` Rich Johnston
2013-08-14 21:27   ` Rich Johnston
2013-08-01 19:25 ` [PATCH 2/2] xfsprogs: Start using pquotaino from on-disk superblock Chandra Seetharaman
2013-08-14 19:03   ` Rich Johnston
2013-08-14 21:27   ` Rich Johnston
2013-08-02  1:50 ` [PATCH 0/2] xfsprogs: Allow pquota and gquota to be used together Dave Chinner
2013-08-02 20:40   ` Chandra Seetharaman
2013-08-14 21:29     ` Rich Johnston

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.