Skip to contentSkip to conversation

xfs: integrate xfs_quota_priv header file to xfs_qm

PATCH Superseded Jeff Liu 2 participants 3 messages Nov 21, 2013 – Nov 22, 2013 XFS filesystem

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 1/1 xfs: integrate xfs_quota_priv header file to xfs_qm

From: Jie Liu <[email protected]>

The xfs_quota_priv header file is only included by xfs_qm header and there is no much users for its contents, hence we can move those stuff to xfs_qm header file and kill it.

This patch also remove an unused macro DQFLAGTO_TYPESTR.

---
 fs/xfs/xfs_qm.h         | 36 +++++++++++++++++++++++++++++++++++-
 fs/xfs/xfs_quota_priv.h | 42 ------------------------------------------
 2 files changed, 35 insertions(+), 43 deletions(-)
 delete mode 100644 fs/xfs/xfs_quota_priv.h
fs/xfs/xfs_qm.h +35 -1
index a788b66..ae02b84 100644
@@ -20,13 +20,47 @@
 
 #include "xfs_dquot_item.h"
 #include "xfs_dquot.h"
-#include "xfs_quota_priv.h"
 
 struct xfs_inode;
 
 extern struct kmem_zone	*xfs_qm_dqtrxzone;
 
 /*
+ * Number of bmaps that we ask from bmapi when doing a quotacheck.
+ * We make this restriction to keep the memory usage to a minimum.
+ */
+#define XFS_DQITER_MAP_SIZE	10
+
+#define XFS_IS_DQUOT_UNINITIALIZED(dqp) ( \
+	!dqp->q_core.d_blk_hardlimit && \
+	!dqp->q_core.d_blk_softlimit && \
+	!dqp->q_core.d_rtb_hardlimit && \
+	!dqp->q_core.d_rtb_softlimit && \
+	!dqp->q_core.d_ino_hardlimit && \
+	!dqp->q_core.d_ino_softlimit && \
+	!dqp->q_core.d_bcount && \
+	!dqp->q_core.d_rtbcount && \
+	!dqp->q_core.d_icount)
+
+/*
+ * Number of bmaps that we ask from bmapi when doing a quotacheck.
+ * We make this restriction to keep the memory usage to a minimum.
+ */
+#define XFS_DQITER_MAP_SIZE	10
+
+#define XFS_IS_DQUOT_UNINITIALIZED(dqp) ( \
+	!dqp->q_core.d_blk_hardlimit && \
+	!dqp->q_core.d_blk_softlimit && \
+	!dqp->q_core.d_rtb_hardlimit && \
+	!dqp->q_core.d_rtb_softlimit && \
+	!dqp->q_core.d_ino_hardlimit && \
+	!dqp->q_core.d_ino_softlimit && \
+	!dqp->q_core.d_bcount && \
+	!dqp->q_core.d_rtbcount && \
+	!dqp->q_core.d_icount)
+
+
+/*
  * This defines the unit of allocation of dquots.
  * Currently, it is just one file system block, and a 4K blk contains 30
  * (136 * 30 = 4080) dquots. It's probably not worth trying to make
fs/xfs/xfs_quota_priv.h deleted +0 -42

42 lines not on this page · raw message

Signature · 6 lines
1.8.3.2

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw
Quoted 7 lines · Jeff Liu

From: Jie Liu <[email protected]>

The xfs_quota_priv header file is only included by xfs_qm header and there is no much users for its contents, hence we can move those stuff to xfs_qm header file and kill it.

This patch also remove an unused macro DQFLAGTO_TYPESTR.

Looks like you pasted the remaining defintions twice into the new location.

Except for that looks fine to me.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

author
#2 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 7 lines · Jeff Liu

From: Jie Liu <[email protected]>

The xfs_quota_priv header file is only included by xfs_qm header and there is no much users for its contents, hence we can move those stuff to xfs_qm header file and kill it.

This patch also remove an unused macro DQFLAGTO_TYPESTR.

Looks like you pasted the remaining defintions twice into the new location.

My apologies, again this proved I should not post patch after spending a whole day for backporting patches manually.
It's past midnight, I have to go to bed, nice day!

Thanks,
-Jeff

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs