linux-mips
[Top] [All Lists]

Re: errno value for EDQUOT on MIPS

To: Erik Frederiksen <erik_frederiksen@pmc-sierra.com>
Subject: Re: errno value for EDQUOT on MIPS
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 28 Jun 2006 19:12:22 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <1151512806.3901.1082.camel@girvin.pmc-sierra.bc.ca>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1151512806.3901.1082.camel@girvin.pmc-sierra.bc.ca>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.1i
On Wed, Jun 28, 2006 at 10:40:07AM -0600, Erik Frederiksen wrote:

> from include/asm-mips/errno.h
> #define EDQUOT      1133    /* Quota exceeded */
> 
> Hi everyone.  I'm kind of confused as to why the value for EDQUOT is so
> large on MIPS.  It seems like no other architectures have errnos that go
> that high.

History; the errno values were inheritted from earlier MIPS operating
systems at a time when that seemed to be a good idea because Linux was
the new kid in town.

> The reason I'm interested is that functions that use ERR_PTR() to return
> error codes in pointers cannot return this error code without IS_ERR()
> thinking that the pointer is valid.  In my case, it caused an alignment
> exception in the XFS open call when quota has been exceeded.  This takes
> place in the linux-mips 2.6.14 kernel.  
> 
> I think that the XFS code has changed enough that this bug isn't in
> newer versions, though I'm not sure about that.  I've supplied a patch
> that addresses this situation by changing the threshold used by IS_ERR
> if EMAXERRNO is defined and greater than 1000.  Looking forward to your
> feedback.

The value 1000 has been choosen pretty arbitrarily I think.  Not sure if
a complicated solution is actually needed.

You may try raising that number to a higher value and posting the patch to
linux-kernel@vger.kernel.org to see if other have an issue with such a
change.

   Ralf

<Prev in Thread] Current Thread [Next in Thread>