The following has be reported by IBM LTC: man pages of quotactl incorrect Hardware Environment: p-series Software Environment: RHEL 3.0 U1 Steps to Reproduce: 1. man quotactl 3. Actual Results: Expected Results: Additional Information:man quotactl is incorrect for Q_GETQUOTA currently it shows Q_GETQUOTA Get disk quota limits and current usage for user or group id. addr is a pointer to a mem_dqblk structure (defined in <linux/quota.h>). Only the super-user may get the quotas of a user other than himself. However, RHEL 3.0, the kernel code is returning if_dqblk. The source code in quota-3.09-1 also shows that. Copying here comment from David Kleikamp ( jfs development ) --------------------------------------------------------- The quotactl man page was wrong, but I see that it has been fixed in quota-tools 3.10. http://sourceforge.net/projects/linuxquota/ It also looks like glibc has an older version of linux/quota.h. The relevent changes were made to the 2.4 kernel source in June, 2003, so I would expect a delay before glibc ships the newer file. ------------------------------------------------------------ I had downloaded quota-tools 3.10 from source forge and in quotactl.2 file now I see ---------------- .TP .SB Q_GETQUOTA Get disk quota limits and current usage for user or group .IR id . .I addr is a pointer to an .B if_dqblk structure (defined in .BR <linux/quota.h> ). The field .I dqb_valid defines the entries in the structure which are set correctly. On .B Q_GETQUOTA call all entries are valid. Only the super-user may get the quotas of a user other than himself. .TP ----------------------- Glen / Greg / Mark, Please report this to RedHat. They need to fix the man pages for quotactl. Also, glibc-kernheaders-2.4-8.34 is shipping an older version of /usr/include/linux/quota.h RedHat should also ship a version of quota.h that has if_dqblk defined so user programs can use quotactl correctly.
------ Additional Comments From zhouwu.com 2004-01-07 21:24 ------- Hi, Salina I just check on RHEL3 Update1. All the related files (/usr/include/linux/quota.h, man quotactl) are the same as on RHEL3 GM. This defect still exist in RHEL3 Update1 Beta.
----- Additional Comments From khoa.com 2004-02-06 09:51 ------- I've put this on RHEL3 QU3 list as a Sev 3.
This should be fixed in the quota-3.10-4 rpm
----- Additional Comments From salina.com 2004-09-14 12:42 EDT ------- We ( Ameet is doing that ) are currently in process of loading RHEL 3 U3 on p630, will check this and close problem if fixed in RHEL 3 U3. Thanks.
----- Additional Comments From ameet.com 2004-09-15 14:41 EDT ------- On a ppc system with RHEL3 U3, the 'man quotactl' shows the following: "The quotactl() call manipulates disk quotas. cmd indicates a command to be applied to UID id or GID id. To set the type of quota use the QCMD(cmd, type) macro. special is a pointer to a null-terminated string containing the path name of the block special device for the filesystem being manipulated. addr is the address of an optional, com- mand specific, data structure which is copied in or out of the system. The interpretation of addr is given with each command below." It appears to be working correctly. If no one objects, I will close the bug.
----- Additional Comments From salina.com 2004-09-15 17:55 EDT ------- [root@ltccd92a kernel]# rpm -qa | grep quota quota-3.09-1 [root@ltccd92a kernel]# Ameet, the level on RHEL 3 U3 is not where the fix is. I need to find the rpm where this is fixed.
----- Additional Comments From salina.com 2004-09-15 17:55 EDT ------- Don't close bug yet.
----- Additional Comments From salina.com 2004-09-15 18:01 EDT ------- Can't find quota-3.10-4 rpm even on rhn. I can only find quota-3.09-1:1. Can't close problem until we can find quota-3.10-4 rpm and install it. That version is not shipped even with RHEL 3 U3 GA
----- Additional Comments From salina.com 2004-10-18 19:04 EDT ------- According to comment #8, this is supposed to be fixed in quota-3.10-4 rpm I can't find that version of quota in rhn.redhat.com Mark Wisner, can you tell me where the fixed version of the rpm is ?
----- Additional Comments From salina.com 2004-10-18 19:19 EDT ------- Got a note that says this is supposed to be fixed in RHEL 3 U4 Beta. However, the quota rpm on RHN for RHEL 3 U4 beta is only quota-3.10-3.ppc.rpm This is not the version that is supposed to have fixed this problem
----- Additional Comments From markwiz.com 2004-10-28 12:02 EDT ------- If you go to RHN and look at the Beta packages I see quota-3.10-4:1.ppc.rpm
----- Additional Comments From salina.com 2004-10-28 18:05 EDT ------- I see the package today. The p630 in use. I need to wait for it to free up before I can use it. Maybe next week.
----- Additional Comments From salina.com 2004-10-28 18:21 EDT ------- ok, got the 630.. installed the new rpm. the problem is fixed. closing. Thanks. -------------------------------------------------------------------------- Q_GETQUOTA Get disk quota limits and current usage for user or group id. addr is a pointer to an if_dqblk structure (defined in <linux/quota.h>). The field dqb_valid defines the entries in the structure which are set cor- rectly. On Q_GETQUOTA call all entries are valid. Only the super-user may get the quotas of a user other than himself.
Fix confirmed with 3.10-4
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-579.html
I was digging into this in result of quota testplan review request [1]. Wrote new beaker test: /CoreOS/quota/Regression/bz113066-LTC5753-man-pages-of-quotactl-incorrect and run it on available distros. It appears that the mentioned structure name has changed again, so that now it's name is not if_dqblk as mentioned in Comment #17, but just dqblk on all releases (below) except rhel6. This can be easilly verified: # grep ^struct /usr/include/sys/quota.h struct dqblk struct dqblk struct dqstats struct dqinfo I tested this on: 3 (Taroon Update 9) (i386-3as.ss.eng.bos.redhat.com), quota-3.10-9.i386 4 (Nahant Update 8) (x86-64-4as-8-m1.ss.eng.bos.redhat.com), quota-3.12-7.el4.x86_64 5.5 (Tikanga) (i386-5s-m1.ss.eng.bos.redhat.com), quota-3.13-1.2.5.el5.i386 5.6 Beta (Tikanga) (auto-i386-001.ss.eng.bos.redhat.com), quota-3.13-3.el5 6.0 (Santiago) (auto-i386-002.ss.eng.bos.redhat.com), quota-3.17-10.el6.i686 On all mentioned releases except 6.0 the manpage is wrong. It reports if_dqblk instead of just dqblk: .live.# zcat /usr/share/man/man2/quotactl.2.gz | sed -e '/^\.SB Q_GETQUOTA$/,/^\.TP$/ !d' | grep dqblk .B if_dqblk .live.# Consulted this with devel (ppisar) and going to clone this for all affected releases. [1] https://bugzilla.redhat.com/show_bug.cgi?id=653907