Date: Tue, 31 Dec 1996 10:52:03 +1100 From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@freefall.freebsd.org, mpp@freefall.freebsd.org Subject: Re: kern/2325: quota.user enlarged, no boot on 2.2-BETA Message-ID: <199612302352.KAA14147@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
> > -rw-r----- 1 root operator 4294967264 Dec 2 09:30 quota.user > > > > It does not appear to occupy the space really. > > > > >How-To-Repeat: > > > > Don't know. If you want me to do some tests, tell me. > > Check your file systems for files owned by a negative uid. > Quotacheck should probably ignore uids < 0. I just checked this (I'm not familiar with the quota code). quota.user seems to be a sparse file with one entry for each uid. There is no such thing as a negative uid, since uids have type `unsigned long'. The maximum uid of 0xffffffff should work because FreeBSD should support files larger than 4GB. However, there are or were many overflow bugs for files larger than 2GB. ufs_quota.c has two obvious ones that are relevant here: auio.uio_offset = (off_t)(id * sizeof (struct dqblk)); auio.uio_offset = (off_t)(dq->dq_id * sizeof (struct dqblk)); Here the id is unsigned long and the struct has size 64, so these calculations overflow when the id is >= 2^26 (67108864). The sparse file would need to be at least 256GB instead of a measly 4GB to correctly support id 0xffffffff. The overflow probably causes id 2^26 to be an alias for id 0. There is probably no problem except for the time that it takes to initialize the 4GB or 256GB file. You are unlikely to have any aliases for 0 or -2 (really 0xfffffffe). Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612302352.KAA14147>
