Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 2004 12:29:52 +0300
From:      Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To:        hackers@freebsd.org
Subject:   Re: Where to start for someone new to kernel coding
Message-ID:  <20041007092952.GA658@pm514-9.comsys.ntu-kpi.kiev.ua>
In-Reply-To: <20041006193350.GA8867@rucus.ru.ac.za>
References:  <20041006193350.GA8867@rucus.ru.ac.za>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041007092952.GA658>