Where to start for someone new to kernel coding

Andrey Simonenko simon at comsys.ntu-kpi.kiev.ua
Thu Oct 7 02:30:10 PDT 2004


On Wed, Oct 06, 2004 at 09:33:50PM +0200, John Oxley wrote:
> 
> I want to extend the disk quota system:
> - Implement a user space daemon to control it.
> - Pass control from the kernel to the user space daemon.

[skipped]

> Is this at all possible, and if so, where should I start looking for
> coding with the kernel.

Quota checks are implemented in chk*() functions from the
sys/ufs/ufs/ufs_quota.c file.  If you want to implement your
idea as a replacement of existing QUOTA, then you need to
modify this file and probably some others.  It is also possible
to change addresses of these functions, but this is a hack.

Another way is using stackable VFS or MAC framework.  In these
approaches your module will have control before actual FS code
is called.  And a module can decide what to do: use already
loaded own quota policy in the kernel or send a message to a
process, which will decide what to do and send a reply back to
your module.


More information about the freebsd-hackers mailing list