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 :-).
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 :-).
-
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/