lkml.org 
[lkml]   [2002]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux-2.5.17
> 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:
> >>>splitting
> >>>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_LOOKUPS,
> DQSTATS_DROPS,
> DQSTATS_READS,
> DQSTATS_WRITES,
> DQSTATS_CACHE_HITS,
> DQSTATS_ALLOCATED, // formerly known as nr_dquts inside kernel.
> DQSTATS_FREE, // formerly known as nr_free_dquots inside
> kernel.
> DQSTATS_SYNCS,
> DQSTATS_SIZE
> };
>
> 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...

> BTW> Since I got already my "required flame dosis" for toady I would
> rather like to express that the rest of the new quota
> handling code is, well, quite nice IMHO of course :-).
Thanks :).

Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.140 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site