move audit/priviliage check into VFS
howard0su at gmail.com
Mon Apr 23 23:25:43 UTC 2007
On 4/23/07, Kostik Belousov <kostikbel at gmail.com> wrote:
> On Sun, Apr 22, 2007 at 02:58:30PM -0700, Howard Su wrote:
> Quota code (ufs/ufs/ufs_quota.c) is mostly filesystem-independent, it
> only require particular format for the quota file, and several fields in
> the ufs mount structure, as well as ufs mount interlock. The later could be
> factored-out quite easily.
> On the other hand, only ufs is stuffed with hooks for the quota handling.
I agree that current implementation is FS-depend. However in theory,
nothing prevent you to store quota data in another FS even. We only
need some API calls which expose through VFS like AllocateQuota,
FreeQuota, CheckQuota. The storage part can be hide by VFS.
Anyway, this is my dream. No prototyping prove it yet.
> I would let others comment on the feasibility of factoring out permission
> check code.
> What I want to point out is that some time ago UFS itself was considered
> as layer with underlying implementation providing the actual structure
> for the storage. At least two such implementations existed, FFS and
> LFS. The LFS is long dead and removed from CVS. All that left from the
> layering is several method pointers in struct ufsmount. I suspect that
> current code has eroded the border between UFS and FFS. That said, I'm
> not sure whether implementing tmpfs as some TMPFS under UFS layer is
> possible now, but you may look at this.
Glad to know some old stuffs. Very helpful.
More information about the freebsd-arch