[XFS] Rework the dquot hash sizing heuristics.

SGI-PV: 943123
SGI-Modid: xfs-linux:xfs-kern:24012a

Signed-off-by: Nathan Scott <nathans@sgi.com>
diff --git a/fs/xfs/quota/xfs_qm.h b/fs/xfs/quota/xfs_qm.h
index 43219c9..12da259 100644
--- a/fs/xfs/quota/xfs_qm.h
+++ b/fs/xfs/quota/xfs_qm.h
@@ -26,6 +26,7 @@
 struct xfs_qm;
 struct xfs_inode;
 
+extern uint		ndquot;
 extern mutex_t		xfs_Gqm_lock;
 extern struct xfs_qm	*xfs_Gqm;
 extern kmem_zone_t	*qm_dqzone;
@@ -51,9 +52,8 @@
 /*
  * Dquot hashtable constants/threshold values.
  */
-#define XFS_QM_NCSIZE_THRESHOLD		5000
-#define XFS_QM_HASHSIZE_LOW		32
-#define XFS_QM_HASHSIZE_HIGH		64
+#define XFS_QM_HASHSIZE_LOW		(NBPP / sizeof(xfs_dqhash_t))
+#define XFS_QM_HASHSIZE_HIGH		((NBPP * 4) / sizeof(xfs_dqhash_t))
 
 /*
  * We output a cmn_err when quotachecking a quota file with more than