Bug 53863 - quota-3.01pre9-0.7.1 broken on 2.4.2-2
quota-3.01pre9-0.7.1 broken on 2.4.2-2
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: quota (Show other bugs)
7.1
i386 Linux
high Severity high
: ---
: ---
Assigned To: Phil Copeland
Brock Organ
:
: 54475 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-20 08:21 EDT by Anders Blomdell
Modified: 2005-10-31 17:00 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-08-02 12:42:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anders Blomdell 2001-09-20 08:21:08 EDT
Description of Problem:

with quota-3.01pre9-0.7.1 many components doesn't work since the quota tools 
doesn't recognize that 2.4.2-2 uses newstyle quota files. The following 
patch is a fix to that problem.


--- quota-tools-rh/quotasys.c   Thu Sep 20 14:13:31 2001
+++ quota-tools-rh-work/quotasys.c      Thu Sep 20 13:33:32 2001
@@ -467,8 +467,30 @@
        if (quotactl(QCMD(Q_GETSTATS, 0), NULL, 0, (void *)&stats) < 0) {
                if (errno == ENOSYS || errno == ENOTSUP)        /* Quota not 
compiled? */
                        return QF_ERROR;
-               if (errno == EINVAL || errno == EFAULT || errno == EPERM)      
/* Old quota compiled? */
-                       return ret | (1 << QF_VFSOLD);
+               if (errno == EINVAL || errno == EFAULT || errno == EPERM) {    
/* Old quota compiled? */
+                 // RedHat 7.1 (2.4.2-2) newquota check 
+                 // Q_GETSTATS in it's old place, Q_GETQUOTA in the new 
place
+                 // (they haven't moved Q_GETSTATS to its new value)
+                 int err_stat = 0;
+                 int err_quota = 0;
+                 char tmp[1024];         /* Just temporary buffer */
+
+                 if (quotactl(QCMD(Q_V1_GETSTATS, 0), NULL, 0, (void *)&
stats)) {
+                   err_stat = errno;
+                 }
+                 if (quotactl(QCMD(Q_V1_GETQUOTA, 0), "", 0, tmp)) {
+                   err_quota = errno;
+                 }
+                 
+                 // On a RedHat 2.4.2-2        we expect 0, EINVAL
+                 // On a 2.4.x                 we expect 0, ENOENT
+                 // On a 2.4.x-ac              we wont get here
+                 if (err_stat == 0 && err_quota == EINVAL) {
+                   return ret | (1 << QF_VFSV0);       /* New format 
supported */
+                 } else {
+                   return ret | (1 << QF_VFSOLD);
+                 }
+               }
                die(4, _("Error while detecting kernel quota version: %s\
n"), strerror(errno));
        }
        /* We might do some more generic checks in future but this should be 
enough for now */
Comment 1 Danny Yee 2001-10-09 02:43:38 EDT
I can verify this problem (with a hand-build kernel 2.4.9): some of the quota
tools work if one specifies -F vfsv0 (for version 2 aquota files), but some
(e.g. and most importantly quotaon) don't support that option.

Can someone please put this patch into an RPM and release it as an update?
I don't want to have to build by own quota tools, and surely a totally
non-functional quota package is a bad enough bug to warrant an update!
Comment 2 Need Real Name 2001-10-09 14:59:37 EDT
Patched rpms are here

ftp://operator.burst.net/sysup/7.1/quota/
Comment 3 Preston Brown 2001-11-06 12:26:30 EST
*** Bug 54475 has been marked as a duplicate of this bug. ***
Comment 4 Phil Copeland 2002-08-02 12:42:34 EDT
Could you have a shot with using the quota-3.06-2 package thats in rawhide
please (I don't have a <7.3 system to hand to verify this) and tell me if this
problem still persists

ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/quota-3.06-2.src.rpm
ftp://ftp.redhat.com/pub/redhat/linux/rawhide/i386/RedHat/RPMS/quota-3.06-2.i386.rpm

Thanks

Phil
=--=
Comment 5 Phil Copeland 2002-08-05 16:33:12 EDT
No activity

Closing

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