Bug 669333

Summary: xfs_quota generates "XFS_GETQUOTA: No such process" errors
Product: Red Hat Enterprise Linux 5 Reporter: Felix Dewaleyne <fdewaley>
Component: xfsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: Petr Beňas <pbenas>
Severity: high Docs Contact:
Priority: high    
Version: 5.5CC: bnater, pasteur, pbenas, psplicha, pstehlik, sergio.ballestrero
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: xfsprogs-2.10.2-8.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 679154 (view as bug list) Environment:
Last Closed: 2013-01-29 13:01:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 679154, 743405    

Description Felix Dewaleyne 2011-01-13 12:00:19 UTC
Description of problem:
xfs_quota generates "XFS_GETQUOTA: No such process" errors when used to check a quota enabled xfs filesystem

Version-Release number of selected component (if applicable):
xfs_quota 2.10.2 (xfs-progs 2.10.2-7)
kernel-2.6.18-194.32.1.el5

How reproducible:
evey time

Steps to Reproduce:
1. create a xfs filesystem
2. mount it with quota enabled into /xfsquota
3. run " /usr/sbin/xfs_quota -x -c ' report -h ' /xfsquota"
  
Actual results:
User quota on /xfsquota (/dev/vdb)
                        Blocks              
User ID      Used   Soft   Hard Warn/Grace   
---------- --------------------------------- 
root            0      0      0  00 [------]

XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process
XFS_GETQUOTA: No such process


Expected results:
User quota on /xfsquota (/dev/vdb)
                        Blocks              
User ID      Used   Soft   Hard Warn/Grace   
---------- --------------------------------- 
root            0      0      0  00 [------]

Additional info:
it looks like this is not relevant to having rules or not for the quota.

Comment 2 Eric Sandeen 2011-02-18 16:56:51 UTC
So, this is indeed just the kernel telling userspace that there is no group quota enabled, when userspace is asking for it.

Userspace is here, must be asking for group quota as you say:

report_mount():

        if (xfsquotactl(XFS_GETQUOTA, dev, type, id, (void *)&d) < 0) {
                if (errno != ENOENT && errno != ENOSYS)
                        perror("XFS_GETQUOTA");
                return 0;
        }

and it gets ESRCH From xfs_qm_dqget():

        if ((! XFS_IS_UQUOTA_ON(mp) && type == XFS_DQ_USER) ||
            (! XFS_IS_PQUOTA_ON(mp) && type == XFS_DQ_PROJ) ||
            (! XFS_IS_GQUOTA_ON(mp) && type == XFS_DQ_GROUP))
                return (ESRCH);

Upstream behaves the same way.

Hm userspace goes down this path, with

        if (!type)
                type = XFS_USER_QUOTA | XFS_GROUP_QUOTA | XFS_PROJ_QUOTA;

report_any_type():

        if (type & XFS_GROUP_QUOTA) {
                fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
                while ((mount = fs_cursor_next_entry(&cursor))) {
                        if (xfsquotactl(XFS_QSYNC, mount->fs_name,
                                                XFS_GROUP_QUOTA, 0, NULL) < 0
                                        && errno != ENOENT && errno != ENOSYS)
                                perror("XFS_QSYNC group quota");
                        report_group_mount(fp, form, mount,
                                                lower, upper, flags);
                }
        }

Seems a little odd that ENOENT wouldn't stop it in its tracks...

I'll send a patch upstream that should fix it.

Comment 4 Eric Sandeen 2011-06-03 17:57:27 UTC
Upstream patch:

commit e127d47bf2b816d1d9b8583d6f429b351e41176f
Author: Eric Sandeen <sandeen>
Date:   Mon Feb 21 12:12:50 2011 -0600

    xfs_quota: don't try to report quotas which aren't there.
    
    Red Hat bug #669333 - xfs_quota generates "XFS_GETQUOTA: No such process" er
    shows that if you do this for a filesystem w/o group quota enabled:
    
    # xfs_quota -x -c ' report -h ' /xfsquota"
    
    You'll get this output:
    
    User quota on /xfsquota (/dev/vdb)
                            Blocks
    User ID      Used   Soft   Hard Warn/Grace

Comment 6 RHEL Program Management 2011-09-23 00:34:05 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 10 RHEL Program Management 2012-04-02 13:11:45 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 14 Petr Beňas 2012-08-07 07:50:10 UTC
Reproduced in xfsprogs-2.10.2-7.el5 and verified in xfsprogs-2.10.2-8.el5.

Comment 16 errata-xmlrpc 2013-01-29 13:01:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0205.html