Bug 121753 - quotacheck counts twice number of inodes for directories
quotacheck counts twice number of inodes for directories
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: quota (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Feist
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-27 08:04 EDT by Jose Traver
Modified: 2010-11-23 08:35 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-19 14:06:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Example test results for bogus package (rhel3). (1.33 KB, application/x-gzip)
2010-11-23 08:35 EST, Martin Cermak
no flags Details

  None (edit)
Description Jose Traver 2004-04-27 08:04:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.1)
Gecko/20031114

Description of problem:
After turning off quotas in a filesystem and executing quotacheck,
then turning quota on again, the number of files shown by quota
command has a n increased count (same number of regular files, but
directories are counted twice).
When deleting one of those directories (twice counted), file-counter
is decreased only once, so the quota is not showing the real state of
the file count.



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

How reproducible:
Always

Steps to Reproduce:
1. $ quota -v
2. $ mkdir ~/dir
3. $ quota -v
4. # quotaoff /home
5. # quotacheck /home
6. # quotaon /home
7. $ quota -v
8. $ rmdir ~/dir
9. $ quota -v

Actual Results:  $ quota -v
Disk quotas for user usuario (uid 2744): 
Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/vg00/home       0       0       0               0       0       0
      

$ mkdir ~/dir 

$ quota -v
Disk quotas for user usuario (uid 2744): 
Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/vg00/home       0       0       0               1       0       0
       

# quotaoff /dev/vg00/home
# quotacheck /dev/vg00/home
# quotaon /dev/vg00/home

$ quota -v
Disk quotas for user usuario (uid 2744): 
Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/vg00/home       0       0       0               2       0       0
       

$ rmdir ~/dir

$ quota -v
Disk quotas for user usuario (uid 2744): 
Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/vg00/home       0       0       0               1       0       0
       


Expected Results:  Command 'quota' should have reported the same data
both times.

Additional info:

Running Kernel 2.4.21-9.0.3.ELsmp
Comment 1 Steve Dickson 2004-10-14 16:51:57 EDT
Should be fixed in quota-3.10-4
Comment 2 Jose Traver 2005-02-09 08:06:32 EST
Hi Steve, 
I've tested quota-3.10-4 and the error is still there. However, I have
recompiled the package with the option "--with-ext2direct=yes" and the
problem seems solved.

Since this option was disabled to fix Bugilla #73244 because of the
UID's > 65535 issue, and that has already been fixed, would it be
sensible to use it on my production servers as well as enable this
option again in future releases?
Comment 5 Chris Feist 2005-03-14 14:40:39 EST
The scan_dir function was counting directories twice.  I've made a
patch and the new version of quota (quota-3.10-6) contains the fix. 
This fix should be in RHEL3U6.
Comment 6 Chris Feist 2005-03-14 17:42:06 EST
Correction, the new version of the package that contains this fix is
quota-3.10-7.
Comment 7 Juanjo Villaplana 2005-03-30 06:41:57 EST
Hi Chris,

We are very interested on a fix for this issue. Could you made available the
quota-3.10-7 (src or binary package) or a patch for the current quota-3.10-4?

Best regards,
                Juanjo
Comment 8 Chris Feist 2005-03-30 10:08:50 EST
A test package which contains the fix is located here:

http://people.redhat.com/cfeist/quota/
Comment 9 Juanjo Villaplana 2005-04-05 03:42:25 EDT
Thanks Chris, it worked fine for us.
Comment 10 Tim Powers 2005-05-19 14:06:15 EDT
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-2005-351.html
Comment 11 Martin Cermak 2010-11-23 08:35:33 EST
Created attachment 462328 [details]
Example test results for bogus package (rhel3).

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