public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] xfsprogs: xfs_quota: a few fixes
@ 2011-08-24 21:53 Alex Elder
  2011-08-24 21:53 ` [PATCH 1/3] xfsprogs: xfs_quota: return real-time used data as intended Alex Elder
  2011-08-25  4:58 ` [PATCH 0/3] xfsprogs: xfs_quota: a few fixes Christoph Hellwig
  0 siblings, 2 replies; 9+ messages in thread
From: Alex Elder @ 2011-08-24 21:53 UTC (permalink / raw)
  To: xfs

The main problem solved in this series is that for project
quotas, the numbers of blocks reported by the xfs_quota "df"
subcommand is twice what it should be.  While looking at
this I also noticed two other problems that I corrected.

Below is a script that demonstrates the problem.

					-Alex

#!/bin/bash

############################################################
# Note that the following clobbers whatever is on /dev/sdk
# It also clobbers files /etc/project and /etc/projid.
# And it uses and then removes /qmnt.
############################################################

# Initialize the filesystem and mount it with project quotas
mkfs.xfs -f /dev/sdk
mkdir -p /qmnt
mount -t xfs -o prjquota /dev/sdk /qmnt

# Set up the project quota configuration files
echo test:1 > /etc/projid
echo 1:/qmnt/test > /etc/projects

# Make the top-level directory, set up quotas on it
mkdir /qmnt/test
xfs_quota -x -c 'project -s test' /qmnt

# Assign block quota limits 
xfs_quota -x -c 'limit -p bsoft=500m bhard=500m test' /qmnt

# The "report" command will show the right numbers
xfs_quota -x -c report /qmnt
# But the "df" command will show doubled block counts
xfs_quota -x -c df /qmnt

# This time using "human readable" output
xfs_quota -x -c 'report -h' /qmnt
xfs_quota -x -c 'df -h' /qmnt

# Clean up
umount /qmnt
rmdir /qmnt
rm /etc/projid /etc/projects

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

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

end of thread, other threads:[~2011-08-25 13:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 21:53 [PATCH 0/3] xfsprogs: xfs_quota: a few fixes Alex Elder
2011-08-24 21:53 ` [PATCH 1/3] xfsprogs: xfs_quota: return real-time used data as intended Alex Elder
2011-08-24 21:53   ` [PATCH 2/3] xfsprogs: xfs_quota: don't double project block counts Alex Elder
2011-08-25  5:01     ` Christoph Hellwig
2011-08-24 21:53   ` [PATCH 3/3] xfsprogs: xfs_quota: improve calculation for percentage display Alex Elder
2011-08-25  5:02     ` Christoph Hellwig
2011-08-25  4:59   ` [PATCH 1/3] xfsprogs: xfs_quota: return real-time used data as intended Christoph Hellwig
2011-08-25  4:58 ` [PATCH 0/3] xfsprogs: xfs_quota: a few fixes Christoph Hellwig
2011-08-25 13:19   ` Alex Elder

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