tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: fs-independent quotas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 20 Oct 2011, Manuel Bouyer wrote:
also it doesn't support cursors.
This can easily be implemented in userland, without changes to the
quotactl(2) interface. I've trouble seeing how this can be sanely
implemented at the quotactl(2) level (I don't like the idea of the
kernel keeping states about what a specific userland process is doing).
Heyas Manuel --
You don't need to track state in the kernel, you just need to keep a
generation ID. Have the caller pass a "starting index" and "requested
count" parameter, and have the kernel include "number of matches", "total
matches", and "generation ID" in the response. Let the kernel limit
the maximum number of matches to return per request if you like. If
the generation ID changes while the caller is fetching records you simply
restart the process.
Cheers,
Jared
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (NetBSD)
iQEcBAEBAgAGBQJOoDSxAAoJEKdMfxFXhnem68IIAIGRUe0LA7chV89RvUBIS8Ji
5N3d/6bGk2bchbmLzHFav3TdR6IZREdOpQ9/sgawNeucP22c2evKh2431ASojsGL
Cd4SbFY6eTWxnC+HFeTVNDVbM7TsIxvIXzpFHZfIPwJGwny6gh4TzyAhP1Ep1wW4
E4AVRrsG5cZyYcFZdxW8/0CL9nNyFU9L2uMNnGldiwkv42lwbsQXoeLI1MfutYLY
6aZy29UWyE4ehwdmB2KrSjqqR6+Pbbzj9AsOEAhlhXotvk7wXPBCfN9WhkstwOUa
uFRmWDqNW5EFr0Q3nbPfTQvD3bYoCNbvHlL27VT+ZB8TsFRk2EO8PROxka8EMOk=
=jXDw
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index