public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: no quota output if no usage?
Date: Wed, 26 Nov 2014 13:26:55 -0600	[thread overview]
Message-ID: <5476297F.8080304@sandeen.net> (raw)

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

             reply	other threads:[~2014-11-26 19:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 19:26 Eric Sandeen [this message]
2014-11-26 21:21 ` no quota output if no usage? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5476297F.8080304@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox