Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40467 - Kernel-quota system overflows when more than 4GB of data for a user
Summary: Kernel-quota system overflows when more than 4GB of data for a user
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Brian Jackson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-05 04:23 UTC by Niels Laukens
Modified: 2004-03-12 00:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Laukens 2004-02-05 04:23:20 UTC
When quota's are enabled (and checked) and one (or more) user(s) have more than 4GB of data, the counter overflows and becomes 0 again.
This problem has already been solved, see https://sourceforge.net/tracker/?func=detail&atid=118136&aid=813160&group_id=18136

However, since it will only be incoorporated in 2.4.23+ and 2.6.0+ and the gentoo sources are still at 2.4.22, you might add this patch to the gentoo-sources (see additional info)

Reproducible: Always
Steps to Reproduce:
1. enable quotas on a file system
2. give a user more than 4GB of files
3. run quotacheck

Actual Results:  
4. run repquota
5. see that the counter has overflown

Expected Results:  
given the right (kilo)byte count

This is the patch I recieved officialy form the quota-developer:

-----SNIP-----

--- linux/fs/quota_v1.c	Tue Oct  7 12:44:00 2003
+++ linux/fs/quota_v1.c	Tue Oct  7 12:44:16 2003
@@ -21,7 +21,7 @@
 	m->dqb_curinodes = d->dqb_curinodes;
 	m->dqb_bhardlimit = d->dqb_bhardlimit;
 	m->dqb_bsoftlimit = d->dqb_bsoftlimit;
-	m->dqb_curspace = d->dqb_curblocks << QUOTABLOCK_BITS;
+	m->dqb_curspace = ((qsize_t)d->dqb_curblocks) << QUOTABLOCK_BITS;
 	m->dqb_itime = d->dqb_itime;
 	m->dqb_btime = d->dqb_btime;
Comment 1 Jason Huebel (RETIRED) gentoo-dev 2004-03-12 00:25:41 UTC
patch already applied in kernel 2.6.3-r1. Closing...