[Top] [All Lists]

no quota output if no usage?

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: no quota output if no usage?
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 26 Nov 2014 13:26:55 -0600
Delivered-to: xfs@xxxxxxxxxxx
This seems a bit weird:

# xfs_quota -x -c 'quota -p project1' /mnt/test

Huh, did it work?

# xfs_quota -x -c 'quota -pv project1' /mnt/test
Disk quotas for Project project1 (1)
Filesystem              Blocks      Quota      Limit  Warn/Time      Mounted on
/dev/sdc2                    0    1024000    1228800   00 [--------] /mnt/test

Oh, ok!

I don't know why reporting limits should depend on the verbose flag, but it
has been that way since 2005 in quota_mount() :

        if (!(flags & VERBOSE_FLAG)) {
                count = 0;
                if ((form & XFS_BLOCK_QUOTA) && d.d_bcount)
                if ((form & XFS_INODE_QUOTA) && d.d_icount)
                if ((form & XFS_RTBLOCK_QUOTA) && d.d_rtbcount)
                if (!count)
                        return 0;

I'm inclined to change it, but is it OK to change the output of this - might old
scripts be relying on this (odd) silent behavior?  I think it can certainly 
confusion (as evidenced by at least one bug I'm looking at ...)


<Prev in Thread] Current Thread [Next in Thread>