public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* no quota output if no usage?
@ 2014-11-26 19:26 Eric Sandeen
  2014-11-26 21:21 ` Dave Chinner
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Sandeen @ 2014-11-26 19:26 UTC (permalink / raw)
  To: xfs-oss

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)
                        count++;
                if ((form & XFS_INODE_QUOTA) && d.d_icount)
                        count++;
                if ((form & XFS_RTBLOCK_QUOTA) && d.d_rtbcount)
                        count++;
                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 cause
confusion (as evidenced by at least one bug I'm looking at ...)

Thanks,
-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-28 16:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 19:26 no quota output if no usage? Eric Sandeen
2014-11-26 21:21 ` Dave Chinner
2014-11-26 21:26   ` Eric Sandeen
2014-11-26 22:18     ` Dave Chinner
2014-11-27  0:28       ` Eric Sandeen
2014-11-27  9:32         ` Jan Kara
2014-11-28 16:40           ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox