Re: Linux-2.5.17

Martin Dalecki (
Wed, 22 May 2002 18:56:42 +0200

Uz.ytkownik Jan Kara napisa?:
>>Uz.ytkownik Jan Kara napisa?:
>>>>Uz.ytkownik Linus Torvalds napisa?:
>>>>>On Wed, 22 May 2002, Russell King wrote:
>>>>>>/proc/sys has a clean and clear purpose.
>>>>>Yes, but it _:would_ be good to make the quota stuff use the existign
>>>>>helper functions to make it much cleaner.
>>>>>And some of those helper functions are definitely from sysctl's:
>>>>>up the quota file into multiple sysctls (_and_ moving it to /proc/sys/fs)
>>>>>sounds like a good idea to me.
>>>>Well I'm actually coding this right now :-).
>>> Thanks. I'll update quota tools to use your new files if you send me
>>>new layout of interface...
>>I'm not ready right now but...
>>Well actually I went the cheapest way possible:
>>Here is the layout of the /proc/sys/fs/dquotas array:
>> * Statistics about disc quota.
>> */
>>enum {
>> DQSTATS_ALLOCATED, // formerly known as nr_dquts inside kernel.
>> DQSTATS_FREE, // formerly known as nr_free_dquots inside
>> kernel.
>>extern __u32 dqstats_array[DQSTATS_SIZE];
>>And here is the allocated sysctl id number:
>> FS_DQSTATS=16, /* int: disc quota suage statistics *
>>All of this appears under:
>>static ctl_table fs_table[] = {
>> {FS_DQSTATS, "dqstats", dqstats_array, sizeof(dqstats_array), 0444,
>> NULL, &proc_dointvec},
>> {},
>>inside /proc/sys/fs/dqstats
>>I dodn't think the particular fields are subject to change soon
>>so I wen't for the array.
>>If yes - please feel rather free to complain :-).
>>Switch over to sysctl() and see the client code
>>melting down :-).
> The array is OK (I don't expect any changes in statistics too).
> I'd just like to have that 'version' and 'formats' fields somewhere.
> Otherwise it's rather hard for quota tools to recognize quota
> interface...

You have the sysctl id number for this purpose and the /proc/sys/fs file
name is right now unique. So there is no need for more
treatment here then just trying to stick to what we get once it's there.
The versioning of syscall returns I will just preserve.

Going through sysctl *will be much easier* in code
then fs lookup of the file above.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at