+++ Charles Manning [2010-03-03 12:20 +1300]:
> On Wednesday 03 March 2010 07:39:53 Wookey wrote:
> > So far as I can tell YAFFS doesn't support unix user quotas.
>
> Correct, there is no quota support.
> > Would it be hard to add? We'd like to be able to allocate users a
> > limited size of flash they can use for user docs and I think quotas
> > would allow this, but YAFFS doesn't have any so that's not going to
> > work as-is.
> >
> > Can anyone confirm that my understanding of qhat quotas actually do is
> > correct, and any idea how much work it is to add, or if there are
> > reasons why it isn't going to fly?
>
> Well, like any software, it's just ones and zeros so it **could** fly with
> sufficient will. How much effort is required I don't know as this would need
> some reading up on how quotas work.
Our rather uninformed persuing suggests that one just needs to turn on
quota support in the kernel VFS and then link to the quota header
instead of noquota.h and make sure that functions in your filesystem
callback the relvant 'update' functions to keep track of quota counts.
And apparently some android people have already got this working, so
it's probably not too hard.
> There are two ways to manage quotas: per user and per group. Full user/group
> support needs knowledge of how much space is used by each user/group. That
> info is available once file details have been loaded, but not directly at
> mount. After a lazy-loaded mount we know what file sizes are, but don't know
> their group/user.
Hmm, that sounds like it might be a problem. We'd have to stop doing
lazy-loading in order to support quotas? Or could checkpointing save
the current user/group counts so we can just track it for each file
changed?
> If your intentions are to just reserve some space for root then there might be
> some much easier ways to do things.
Well the idea is to limit user data size so that the system doesn't
fill up. Having started writing code to keep track ourselves in the
app it's starting to look like it would be smnarter to have the
filesystem do it for us. The app doesn't run as root (after startup).
Wookey
--
Principal hats: iEndian - Balloonboard - Toby Churchill - Emdebian
http://wookware.org/