Bug 98922 - Incompatible quotactl ABI change
Incompatible quotactl ABI change
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-07-10 10:01 EDT by John Dalbec
Modified: 2007-04-18 12:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-30 11:41:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Dalbec 2003-07-10 10:01:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1 (ax)

Description of problem:
The kernel quotactl ABI has changed incompatibly between kernel 2.4.18 and
2.4.20.  The following program works under 2.4.18-24.7.x but not 2.4.20-18.7. 
The old ABI should be restored or the glibc-kernheaders package should be
updated to reflect the change.
#include <linux/quota.h>
#include <errno.h>
main() {
  struct mem_dqblk dqb;
  if(quotactl(QCMD(Q_GETQUOTA, USRQUOTA), "/dev/hda7",
	500, (caddr_t) & dqb) != 0){
	  printf("getquota failed %s\n",strerror(errno));

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Compile above program against glibc-kernheaders 2.4-7.16.
2. Run above program under kernel 2.4.18
3. Run above program under kernel 2.4.20

Actual Results:  Program runs fine under 2.4.18 but reports "invalid argument"
under 2.4.20.

Expected Results:  Program should run under both kernels, or a glibc-kernheaders
update should have been issued.

Additional info:

500 is my user ID.  /dev/hda7 is an ext2 filesystem.  Actually I rather like the
new interface (if_dqblk) so I wouldn't mind seeing a glibc update.  But it's
your call.
Comment 1 John Dalbec 2003-07-15 12:43:49 EDT
If you want to restore the 2.4.18 quotactl ABI (so that the kernel is compatible
with the current <linux/quota.h>), the following patch seems to work.  You'll
have to apply it to each config file separately.

--- kernel-2.4.20-i686.config	Tue May 27 10:10:35 2003
+++ kernel-2.4.20-i686.config	Mon Jul 14 15:12:58 2003
@@ -1328,7 +1328,10 @@
 # CONFIG_QFMT_V1 is not set
+# CONFIG_QIFACE_V1 is not set
Comment 2 Shojiro Matsuura 2003-08-21 04:49:25 EDT
Please raise priority of this. 
My program is using quotactl system call to get/set user's quota 
but it always reports 'invalid argument' on kernel 2.4.20 because 
the definition of commands (such as Q_GETQUOTA) in kernel's header 
file and gcc's header file are different. 
Definition of Q_GETQUOTA in: 
    <kernel-source-directory>/linux/quota.h : 0x800007 
    /usr/include/linux/quota.h              : 0x0D00 
Comment 3 Bugzilla owner 2004-09-30 11:41:16 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.