IMP Quota command driver, was Re: [dev] Bounties

Eric Rostetter eric.rostetter at physics.utexas.edu
Fri Jan 30 14:50:08 PST 2004


Quoting Etienne Goyer <etienne.goyer at linuxquebec.com>:

> On Fri, Jan 30, 2004 at 02:35:10PM -0600, Eric Rostetter wrote:
> > Quick look at the approach says it is not the correct approach.
> >
> > >             'partition' => '/dev/sda2'
> > >         ),
> > >     ),
> > >
> > > Replace the 'partition' value with the partition name for which you want
> > > to retrieve for.
> >
> > I have quotas on 8 partitions...  See the problem?
>
> Ok, there is two way to look at it :

Or 3 ways...

> 1. If your mail reside on a single partition.

Nope.  Incoming mail comes to /var/spool/mail, on which I *do not* have
quotas.  It can optionally be moved to the user's home directory (via the
presence of a "mbox" file in their home directory; ala WU-IMAP) which
*does* have a quota.  The home directory is on one of seven volumes (too
many users to put them all on one, etc).  All mail folders go in the
home directory (in a folder called mail/; also WU-IMAP), so this counts
against the quota, as do their normal files, but stuff in /var/spool/mail
does not.

>  This is an IMP
> class

No, it is a horde/imp/accounts class depending on your release
versions.

> so I assume we look for the quota that is applied to your
> mailbox.

Bad assumption.

> Thus, the 'partition' have to be set to the one that host the
> mail spool, and the current behavior is correct.

Nope, I have no quota there, so this is wrong.  My quota is on the seven
user partitions, and it needs to find the right one for each user.

> 2. You add up all the used quota and all the limit, and return this.

Nope.  We have an eighth partition (called /temp) for which each user
has a 1GB limit/quota.  The home partition quotas are defaulted to 30 MB
but can go as high as 250 MB.  If you add their usage on both (say 35/30 MB
in home, 20MB/1GB in /temp, total of 55 MB) and compare that to the sum
of the limits (30MB + 1GB = 1.3GB) it will say they are under quota, but
they obviously are *over* quota on their home device.

> Assuming your mailbox reside on a single one of these partition, your
> usage on different partition should be nil and thus it would add
> correctly.

Nope, see example above.

> But the total would be screwed and I don't see how it can be
> fixed.

Don't go there in the first place.

> I prefer 1 for reasons I will explain below.

I prefer a third option.  Locating the proper home directory and use the
quotas on that device.

> > Did you fix the problem of line wrapping on long device names?  (I didn't
> > look at the code to see).
>
> Yes.  If I am not mistaken, it wrap when the partition name is longer than
> 15 caracters.  This is taken into account when I parse the quota output.

Okay, that's a good start (and one of the biggest problems of the current
implementation).

> Considering how the current version of the quota command output, I don't
> see any way to do a general solution.

I'm sure there is a way.

> I am, of course, open to
> suggestion.

have you searched the archives?  there were patches submitted and ideas
discussed...

>  Considering that the current driver is broken for
> (apparently) many people, we have the choice of either leave it as it
> is, or fix it with the limitation of only be able to deal with quota on
> one partition.

No, the choice is leave it as it is (so it doesn't break for people using
it for whom it does work) *until* we can fix it properly (so it works for
everyone).

> My fix, BTW, is completely backward-compatible so it
> will not affect those for whom the driver currently work.

Wrong.  It currently works for me, and your patch will not.

> Personnally, I'll fix it with limitation considering that this
> limitation will not affect most users and can be documented.  Or we can

That would not make me happy...  It would break my installation.

> wait until someone come up with a general solution, which may never
> happen.  I don't have the commit bit so I'll leave the decision to
> whoever is responsible.

Or, keep working on it.  Keep asking for help on the list, etc.  Eventually
we'll get there.  I'd do it, but I just plain don't have the time right
now...

> --
> Etienne Goyer                    Linux Québec Technologies Inc.
> http://www.LinuxQuebec.com       etienne.goyer at linuxquebec.com

--
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!


More information about the dev mailing list