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

Etienne Goyer etienne.goyer at linuxquebec.com
Fri Jan 30 13:36:43 PST 2004


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 :

1. If your mail reside on a single partition.  This is an IMP
class, so I assume we look for the quota that is applied to your
mailbox.  Thus, the 'partition' have to be set to the one that host the
mail spool, and the current behavior is correct.

2. You add up all the used quota and all the limit, and return this.
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.  But the total would be screwed and I don't see how it can be
fixed.

I prefer 1 for reasons I will explain below.
 
> 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.
 
> Again, I didn't examine the code, but your e-mail text suggests that this
> is not going to work as a general solution.  Correct me if I'm wrong.

Considering how the current version of the quota command output, I don't
see any way to do a general solution.  I am, of course, open to
suggestion.  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.  My fix, BTW, is completely backward-compatible so it
will not affect those for whom the driver currently work.

Personnally, I'll fix it with limitation considering that this
limitation will not affect most users and can be documented.  Or we can
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.



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

Kernel Preemption is a bad idea. Who are the users to think their 
trivial tasks are more important than the kernel's ? 


More information about the dev mailing list