Re: Quota limit?

G. Allen Morris III (gam3@dharma.sehda.com)
Mon, 23 Nov 1998 12:07:29 -0800


>>>Webmaster+BOfH said:
> Is there a kernel limit for how large quotas
> can be? If I set the quota to e.g. 6000000 blocks,
> it gets set to 1805696.
>
> Different values entered in edquota yield different
> results:
>
> 5000000 -> 805696
> 7000000 -> 2805696
>
> so I think it's safe to say something wraps.
>
> Is it in Quota utils or in the kernel?

It is in the kernel. The blocks are left shifted 10 bits in
/usr/include/linux/quota.h. This leaves 22 bit for data.

7000000 = 0x6ACFC0
2805696 = 0x2ACFC0

5000000 = 0x4C4B40
805696 = 0x0C4B40

So the effective mask is 0x3FFFFF. The lower 22 (32-10) bits.

If you look in /usr/include/linux/quota.h you will find the following:

/*
* Convert diskblocks to blocks and the other way around.
*/
#define dbtob(num) (num << 10)
#define btodb(num) (num >> 10)

Do you have files larger than 4GB?

Allen
-----------------------------------------
G. Allen Morris III <gam3@acm.org>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/