From: Barry Naujok Date: Mon, 23 Jul 2007 16:02:20 +0000 (+0000) Subject: Don't query project quota info on filesystems not mounted with pquota X-Git-Tag: v2.10.0~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2df877fbf0b3c5c2a39446be756320ea58fb133;p=thirdparty%2Fxfsprogs-dev.git Don't query project quota info on filesystems not mounted with pquota Merge of master-melb:xfs-cmds:29202a by kenmcd. Update to 2.9.3 --- diff --git a/VERSION b/VERSION index e6abef7de..a33b18f06 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=9 -PKG_REVISION=2 +PKG_REVISION=3 PKG_BUILD=1 diff --git a/doc/CHANGES b/doc/CHANGES index bbaced5f1..023ad1adc 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,4 +1,17 @@ -xfsprogs-2.9.2 (16 July 2007) +xfsprogs-2.9.3 (23 July 2007) + - Make xfs_repair support > 512 byte sector sizes. + - Fixed include Makefile for new common header (xfs_metadump.h). + - Fixed xfs_quota state command segfaulting with no mounted + XFS filesystems. + - Fixed xfs_quota printing out unusual message with "path n" command + with no mounted XFS filesystems. + - Fixed "quota -n" command with project IDs. + - Improved "free" output when project quotas are defined, but + haven't been enable on the filesystem. + Thanks to Utako Kusaka for the above four + fixes. + +xfsprogs-2.9.2 (18 July 2007) - Next major round of xfs_repair performance improvements: - Cache disk nlink values in Phase 3 for Phase 7. - Do multithreaded prefetch/processing based on AG stride @@ -14,6 +27,7 @@ xfsprogs-2.9.2 (16 July 2007) the new superblocks. - Fix up xfs_info and xfs_quota's -c handling with global commands. - Improve xfs_bmap -vp output to always show the FLAGS column. + - Update man pages. xfsprogs-2.9.1 (28 June 2007) - Added filestreams support to xfs_io. diff --git a/quota/free.c b/quota/free.c index 075dad8b2..28b944bbe 100644 --- a/quota/free.c +++ b/quota/free.c @@ -116,12 +116,17 @@ projects_free_space_data( __uint64_t *rused, __uint64_t *rfree) { + fs_quota_stat_t qfs; fs_disk_quota_t d; struct fsxattr fsx; uint type = XFS_PROJ_QUOTA; char *dev = path->fs_name; int fd; + if (xfsquotactl(XFS_GETQSTAT, dev, type, 0, &qfs) < 0 || + !(qfs.qs_flags & XFS_QUOTA_PDQ_ACCT)) + return 0; + if ((fd = open(path->fs_dir, O_RDONLY)) < 0) { fprintf(stderr, "%s: cannot open %s: %s\n", progname, path->fs_dir, strerror(errno));