packages: xfsprogs/xfsprogs.spec, xfsprogs/xfsprogs-noquotasync.patch (NEW)...

arekm arekm at pld-linux.org
Mon Jan 30 13:02:15 CET 2012


Author: arekm                        Date: Mon Jan 30 12:02:14 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; don't call expensive quota sync

---- Files affected:
packages/xfsprogs:
   xfsprogs.spec (1.148 -> 1.149) , xfsprogs-noquotasync.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/xfsprogs/xfsprogs.spec
diff -u packages/xfsprogs/xfsprogs.spec:1.148 packages/xfsprogs/xfsprogs.spec:1.149
--- packages/xfsprogs/xfsprogs.spec:1.148	Wed Nov 23 18:21:24 2011
+++ packages/xfsprogs/xfsprogs.spec	Mon Jan 30 13:02:09 2012
@@ -9,7 +9,7 @@
 Summary(pl.UTF-8):	Narzędzia do systemu plików XFS
 Name:		xfsprogs
 Version:	3.1.7
-Release:	1
+Release:	2
 License:	LGPL v2.1 (libhandle), GPL v2 (the rest)
 Group:		Applications/System
 Source0:	ftp://linux-xfs.sgi.com/projects/xfs/cmd_tars/%{name}-%{version}.tar.gz
@@ -23,6 +23,7 @@
 Patch6:		xfsprogs-repair-mem.patch
 Patch7:		xfsprogs-repair-nofutexhang.patch
 Patch8:		xfsprogs-repair-tcmalloc.patch
+Patch9:		%{name}-noquotasync.patch
 URL:		http://www.xfs.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -136,6 +137,7 @@
 %patch6 -p1
 %patch7 -p1
 %{?with_tcmalloc:%patch8 -p1}
+%patch9 -p1
 
 %build
 %{__aclocal} -I m4
@@ -315,6 +317,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.149  2012/01/30 12:02:09  arekm
+- rel 2; don't call expensive quota sync
+
 Revision 1.148  2011/11/23 17:21:24  qboosh
 - updated pl.po-update patch
 - added tcmalloc bcond; updated libtcmalloc BR (now separated from the rest of google-perftools)

================================================================
Index: packages/xfsprogs/xfsprogs-noquotasync.patch
diff -u /dev/null packages/xfsprogs/xfsprogs-noquotasync.patch:1.1
--- /dev/null	Mon Jan 30 13:02:14 2012
+++ packages/xfsprogs/xfsprogs-noquotasync.patch	Mon Jan 30 13:02:09 2012
@@ -0,0 +1,123 @@
+
+In 2005 commit master-melb:xfs-cmds:23840a from Nathan added calls to
+XFS_QSYNC/Q_XQUOTASYNC to xfs_quota, with the following rather sparse
+description:
+
+ "Issue a quote sync before reporting quota, resolving issue with delayed
+  allocation."
+
+I can't really see a reason for this - we do quota accounting by the time
+we reserve space for the delayed allocation, and while converting the
+reservations might change the quota accounting minimally due to the amount
+of btree blocks used for the bmap btree on large files in generally this
+makes little sense, and on today's large system has a large performance
+impact.  Also only xfs_quota ever did these calls, the generic quota tool
+never did any kind of sync, and of course removing it does not cause
+any regressions in xfstests.
+
+Nathan, I've cced you in case you still remember anything about this,
+although it's fairly unlikely after 6.5 years.  Also if anyone at SGI
+can find anything about the above commits in BugWorks additional feedback
+would be welcome.
+
+Signed-off-by: Christoph Hellwig <hch at lst.de>
+
+Index: xfsprogs-dev/quota/free.c
+===================================================================
+--- xfsprogs-dev.orig/quota/free.c	2012-01-27 11:10:34.000000000 +0000
++++ xfsprogs-dev/quota/free.c	2012-01-27 11:10:42.000000000 +0000
+@@ -167,7 +167,6 @@ projects_free_space_data(
+ 		return 0;
+ 	}
+ 
+-	xfsquotactl(XFS_QSYNC, dev, type, fsx.fsx_projid, NULL);
+ 	if (xfsquotactl(XFS_GETQUOTA, dev, type, fsx.fsx_projid, &d) < 0) {
+ 		perror("XFS_GETQUOTA");
+ 		close(fd);
+Index: xfsprogs-dev/quota/irix.c
+===================================================================
+--- xfsprogs-dev.orig/quota/irix.c	2012-01-27 11:10:52.000000000 +0000
++++ xfsprogs-dev/quota/irix.c	2012-01-27 11:10:59.000000000 +0000
+@@ -45,8 +45,6 @@ xcommand_to_qcommand(
+ 		return Q_XGETQSTAT;
+ 	case XFS_QUOTARM:
+ 		return Q_XQUOTARM;
+-	case XFS_QSYNC:
+-		return Q_SYNC;
+ 	}
+ 	return 0;
+ }
+Index: xfsprogs-dev/quota/linux.c
+===================================================================
+--- xfsprogs-dev.orig/quota/linux.c	2012-01-27 11:11:02.000000000 +0000
++++ xfsprogs-dev/quota/linux.c	2012-01-27 11:11:05.000000000 +0000
+@@ -55,8 +55,6 @@ xcommand_to_qcommand(
+ 		return Q_XGETQSTAT;
+ 	case XFS_QUOTARM:
+ 		return Q_XQUOTARM;
+-	case XFS_QSYNC:
+-		return Q_XQUOTASYNC;
+ 	}
+ 	return 0;
+ }
+Index: xfsprogs-dev/quota/quota.c
+===================================================================
+--- xfsprogs-dev.orig/quota/quota.c	2012-01-27 11:10:24.000000000 +0000
++++ xfsprogs-dev/quota/quota.c	2012-01-27 11:10:29.000000000 +0000
+@@ -64,7 +64,6 @@ quota_mount(
+ 	uint		qflags;
+ 	int		count;
+ 
+-	xfsquotactl(XFS_QSYNC, dev, type, 0, NULL);
+ 	if (xfsquotactl(XFS_GETQUOTA, dev, type, id, (void *)&d) < 0)
+ 		return 0;
+ 
+Index: xfsprogs-dev/quota/quota.h
+===================================================================
+--- xfsprogs-dev.orig/quota/quota.h	2012-01-27 11:11:10.000000000 +0000
++++ xfsprogs-dev/quota/quota.h	2012-01-27 11:11:20.000000000 +0000
+@@ -41,7 +41,6 @@ enum {
+ 	XFS_SETQLIM,	/* set disk limits */
+ 	XFS_GETQSTAT,	/* get quota subsystem status */
+ 	XFS_QUOTARM,	/* free disk space used by dquots */
+-	XFS_QSYNC,	/* flush delayed allocate space */
+ };
+ 
+ /*
+Index: xfsprogs-dev/quota/report.c
+===================================================================
+--- xfsprogs-dev.orig/quota/report.c	2012-01-27 11:09:41.000000000 +0000
++++ xfsprogs-dev/quota/report.c	2012-01-27 11:10:19.000000000 +0000
+@@ -520,10 +520,6 @@ report_any_type(
+ 	if (type & XFS_USER_QUOTA) {
+ 		fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
+ 		while ((mount = fs_cursor_next_entry(&cursor))) {
+-			if (xfsquotactl(XFS_QSYNC, mount->fs_name,
+-						XFS_USER_QUOTA, 0, NULL) < 0
+-					&& errno != ENOENT && errno != ENOSYS)
+-				perror("XFS_QSYNC user quota");
+ 			report_user_mount(fp, form, mount,
+ 						lower, upper, flags);
+ 		}
+@@ -531,10 +527,6 @@ report_any_type(
+ 	if (type & XFS_GROUP_QUOTA) {
+ 		fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
+ 		while ((mount = fs_cursor_next_entry(&cursor))) {
+-			if (xfsquotactl(XFS_QSYNC, mount->fs_name,
+-						XFS_GROUP_QUOTA, 0, NULL) < 0
+-					&& errno != ENOENT && errno != ENOSYS)
+-				perror("XFS_QSYNC group quota");
+ 			report_group_mount(fp, form, mount,
+ 						lower, upper, flags);
+ 		}
+@@ -542,10 +534,6 @@ report_any_type(
+ 	if (type & XFS_PROJ_QUOTA) {
+ 		fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
+ 		while ((mount = fs_cursor_next_entry(&cursor))) {
+-			if (xfsquotactl(XFS_QSYNC, mount->fs_name,
+-						XFS_PROJ_QUOTA, 0, NULL) < 0
+-					&& errno != ENOENT && errno != ENOSYS)
+-				perror("XFS_QSYNC proj quota");
+ 			report_project_mount(fp, form, mount,
+ 						lower, upper, flags);
+ 		}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/xfsprogs/xfsprogs.spec?r1=1.148&r2=1.149&f=u



More information about the pld-cvs-commit mailing list