DragonFly BSD
DragonFly kernel List (threaded) for 2011-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

VFS Quota project


From: Francois Tigeot <ftigeot@xxxxxxxxxxxx>
Date: Thu, 18 Aug 2011 10:58:52 +0200

Hi,

This project was initially proposed by Samuel J. Greear for GSoc 2010 but was
not picked up:

https://gist.github.com/846391

Since Hammer would be much more useful to me with some form of quota support,
and the friendly DragonFly developers convinced me kernel programming was not
impossible to do, I gave this project a try.

The code I've produced so far is available here:
http://gitweb.dragonflybsd.org/~ftigeot/dragonfly.git/shortlog/refs/heads/vfs-quota

Some of the design decisions I've made:
- the implementations resides in the virtual filesystem layer, it is
  independent from the different filesystems types

- all operations are managed per volume/mount point.

- accounting is separated from limit enforcing
  In some cases, knowing how much to bill some users is enough

For now, only accounting is implemented. It is automatically enabled for most
volumes mounted read/write, and it is disabled for filesystems for which it
wouldn't make sense such as ms-dos, devfs or nfs.

Accounting data is not yet initialized at mount time and not permanently saved
to the volumes but some skeleton code is there to do it in the future.

Collected data can be shown with a new vquota(8) command:
	$ vquota show /tmp

It will print the size of written data for each uid and gid on the console
(visible with dmesg)


The only major issue I've found so far is with nullfs mounts: from the virtual
filesystem layer point of view, they simply don't exist.
All operations which should be done on a nullfs mount are instead done on the
underlying non-nullfs volume.

Since PFSes are mounted using nullfs, that means no PFS operation can be
separated from its single hammer datastore, and makes PFSes useless for
accounting and/or quota purposes.

I'd love to find a solution to this problem.

-- 
Francois Tigeot



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]