From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] fix nasty quota hashtable allocation bug
Date: Sun, 05 Aug 2007 16:06:10 -0500 [thread overview]
Message-ID: <46B63BC2.7020109@sandeen.net> (raw)
This git mod: 77e4635ae191774526ed695482a151ac986f3806
converted to a "greedy" allocation interface, but for the quota hashtables
it switched from allocating XFS_QM_HASHSIZE (nr of elements) xfs_dqhash_t's
to allocating only XFS_QM_HASHSIZE *bytes* - quite a lot smaller! Then when
we converted hsize "back" to nr of elements (the division line) hsize went
to 0. This was leading to oopses when running any quota tests on the Fedora 8
test kernel, but the problem has been there for almost a year.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Index: linux-2.6.22-rc4/fs/xfs/quota/xfs_qm.c
===================================================================
--- linux-2.6.22-rc4.orig/fs/xfs/quota/xfs_qm.c
+++ linux-2.6.22-rc4/fs/xfs/quota/xfs_qm.c
@@ -117,7 +117,8 @@ xfs_Gqm_init(void)
* Initialize the dquot hash tables.
*/
udqhash = kmem_zalloc_greedy(&hsize,
- XFS_QM_HASHSIZE_LOW, XFS_QM_HASHSIZE_HIGH,
+ XFS_QM_HASHSIZE_LOW * sizeof(xfs_dqhash_t),
+ XFS_QM_HASHSIZE_HIGH * sizeof(xfs_dqhash_t),
KM_SLEEP | KM_MAYFAIL | KM_LARGE);
gdqhash = kmem_zalloc(hsize, KM_SLEEP | KM_LARGE);
hsize /= sizeof(xfs_dqhash_t);
reply other threads:[~2007-08-05 21:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46B63BC2.7020109@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox