PERFORCE change 142188 for review
John Birrell
jb at FreeBSD.org
Sat May 24 04:23:57 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=142188
Change 142188 by jb at freebsd3 on 2008/05/24 04:23:27
IFC
Affected files ...
.. //depot/projects/dtrace/ports/UPDATING#75 integrate
.. //depot/projects/dtrace/src/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h#4 integrate
.. //depot/projects/dtrace/src/sbin/dump/dump.8#6 integrate
.. //depot/projects/dtrace/src/sbin/dump/dump.h#5 integrate
.. //depot/projects/dtrace/src/sbin/dump/main.c#6 integrate
.. //depot/projects/dtrace/src/sbin/dump/traverse.c#6 integrate
.. //depot/projects/dtrace/src/sys/kern/vfs_mount.c#33 integrate
.. //depot/projects/dtrace/src/sys/ufs/ffs/ffs_vfsops.c#24 integrate
Differences ...
==== //depot/projects/dtrace/ports/UPDATING#75 (text+ko) ====
@@ -6,6 +6,17 @@
time you update your ports collection, before attempting any port
upgrades.
+20080524:
+ AFFECTS: users of net-im/jabberd
+ AUTHOR: mm at FreeBSD.org
+
+ Starting with version 2.2.0, resolver is now built in the S2S component.
+ Jabberd configuration files require updating.
+
+ jabberd.cfg: resolver component must be removed
+ s2s.xml: <lookup> section must be added (see s2s.xml.dist)
+ resolver.xml: may be deleted (file not required anymore)
+
20080519:
AFFECTS: users of www/nginx and www/nginx-devel
AUTHOR: osa at FreeBSD.org
@@ -6453,4 +6464,4 @@
2) Update all p5-* modules.
portupgrade -f p5-\*
-$FreeBSD: ports/UPDATING,v 1.634 2008/05/20 09:57:45 osa Exp $
+$FreeBSD: ports/UPDATING,v 1.635 2008/05/24 00:05:24 mm Exp $
==== //depot/projects/dtrace/src/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h#4 (text+ko) ====
@@ -61,7 +61,6 @@
#include <time.h>
#include <math.h>
#include <umem.h>
-#include <vmem.h>
#include <fsshare.h>
#include <sys/note.h>
#include <sys/types.h>
==== //depot/projects/dtrace/src/sbin/dump/dump.8#6 (text+ko) ====
@@ -27,7 +27,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)dump.8 8.3 (Berkeley) 5/1/95
-.\" $FreeBSD: src/sbin/dump/dump.8,v 1.75 2006/09/18 11:55:09 ru Exp $
+.\" $FreeBSD: src/sbin/dump/dump.8,v 1.76 2008/05/23 23:13:14 mckusick Exp $
.\"
.Dd February 24, 2006
.Dt DUMP 8
@@ -38,7 +38,7 @@
.Nd file system backup
.Sh SYNOPSIS
.Nm
-.Op Fl 0123456789acLnSu
+.Op Fl 0123456789acLnrRSu
.Op Fl B Ar records
.Op Fl b Ar blocksize
.Op Fl C Ar cachesize
@@ -258,6 +258,27 @@
.Dq operator
by means similar to a
.Xr wall 1 .
+.It Fl r
+Be rsync-friendly.
+Normally dump stores the date of the current
+and prior dump in numerous places throughout the dump.
+These scattered changes significantly slow down rsync or
+another incremental file transfer program when they are
+used to update a remote copy of a level 0 dump,
+since the date changes for each dump.
+This option sets both dates to the epoch, permitting
+rsync to be much more efficient when transferring a dump file.
+.It Fl R
+Be even more rsync-friendly.
+This option disables the storage of the actual inode access time
+(storing it instead as the inode's modified time).
+This option permits rsync to be even more efficient
+when transferring dumps generated from filesystems with numerous files
+which are not changing other than their access times.
+The
+.Fl R
+option also sets
+.Fl r .
.It Fl S
Display an estimate of the backup size and the number of
tapes required, and exit without actually performing the dump.
==== //depot/projects/dtrace/src/sbin/dump/dump.h#5 (text+ko) ====
@@ -28,7 +28,7 @@
*
* @(#)dump.h 8.2 (Berkeley) 4/28/95
*
- * $FreeBSD: src/sbin/dump/dump.h,v 1.28 2007/02/26 08:15:56 mckusick Exp $
+ * $FreeBSD: src/sbin/dump/dump.h,v 1.29 2008/05/23 23:13:14 mckusick Exp $
*/
/*
@@ -75,6 +75,7 @@
int nonodump; /* if set, do not honor UF_NODUMP user flags */
int unlimited; /* if set, write to end of medium */
int cachesize; /* size of block cache in bytes */
+int rsync_friendly; /* be friendly with rsync */
int notify; /* notify operator flag */
int blockswritten; /* number of blocks written on current tape */
==== //depot/projects/dtrace/src/sbin/dump/main.c#6 (text+ko) ====
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/dump/main.c,v 1.65 2006/10/12 20:22:31 ru Exp $";
+ "$FreeBSD: src/sbin/dump/main.c,v 1.66 2008/05/23 23:13:14 mckusick Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -117,13 +117,14 @@
if (TP_BSIZE / DEV_BSIZE == 0 || TP_BSIZE % DEV_BSIZE != 0)
quit("TP_BSIZE must be a multiple of DEV_BSIZE\n");
level = '0';
+ rsync_friendly = 0;
if (argc < 2)
usage();
obsolete(&argc, &argv);
while ((ch = getopt(argc, argv,
- "0123456789aB:b:C:cD:d:f:h:LnP:Ss:T:uWw")) != -1)
+ "0123456789aB:b:C:cD:d:f:h:LnP:RrSs:T:uWw")) != -1)
switch (ch) {
/* dump level */
case '0': case '1': case '2': case '3': case '4':
@@ -189,6 +190,16 @@
popenout = optarg;
break;
+ case 'r': /* store slightly less data to be friendly to rsync */
+ if (rsync_friendly < 1)
+ rsync_friendly = 1;
+ break;
+
+ case 'R': /* store even less data to be friendlier to rsync */
+ if (rsync_friendly < 2)
+ rsync_friendly = 2;
+ break;
+
case 'S': /* exit after estimating # of tapes */
just_estimate = 1;
break;
@@ -236,6 +247,11 @@
(void)fprintf(stderr, "\n");
exit(X_STARTUP);
}
+ if (rsync_friendly && (level>'0')) {
+ (void)fprintf(stderr, "%s %s\n", "rsync friendly options",
+ "can be used only with level 0 dumps.");
+ exit(X_STARTUP);
+ }
if (Tflag && uflag) {
(void)fprintf(stderr,
"You cannot use the T and u flags together.\n");
@@ -384,7 +400,11 @@
(void)gethostname(spcl.c_host, NAMELEN);
spcl.c_level = level - '0';
spcl.c_type = TS_TAPE;
-
+ if (rsync_friendly) {
+ /* don't store real dump times */
+ spcl.c_date = 0;
+ spcl.c_ddate = 0;
+ }
if (spcl.c_date == 0) {
tmsg = "the epoch\n";
} else {
@@ -393,7 +413,7 @@
}
msg("Date of this level %c dump: %s", level, tmsg);
- if (!Tflag)
+ if (!Tflag && (!rsync_friendly))
getdumptime(); /* /etc/dumpdates snarfed */
if (spcl.c_ddate == 0) {
tmsg = "the epoch\n";
==== //depot/projects/dtrace/src/sbin/dump/traverse.c#6 (text+ko) ====
@@ -32,7 +32,7 @@
static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/dump/traverse.c,v 1.40 2007/04/05 20:31:23 thomas Exp $";
+ "$FreeBSD: src/sbin/dump/traverse.c,v 1.41 2008/05/23 23:13:14 mckusick Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -842,6 +842,11 @@
{
int32_t sum, cnt, *lp;
+ if (rsync_friendly >= 2) {
+ /* don't track changes to access time */
+ spcl.c_atime = spcl.c_mtime;
+ spcl.c_atimensec = spcl.c_mtimensec;
+ }
spcl.c_inumber = ino;
spcl.c_magic = FS_UFS2_MAGIC;
spcl.c_checksum = 0;
==== //depot/projects/dtrace/src/sys/kern/vfs_mount.c#33 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.281 2008/04/29 21:40:11 rdivacky Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/vfs_mount.c,v 1.282 2008/05/23 23:33:07 rodrigc Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -697,8 +697,6 @@
opt->name = strdup("ro", M_MOUNT);
fsflags |= MNT_RDONLY;
}
- else if (strcmp(opt->name, "snapshot") == 0)
- fsflags |= MNT_SNAPSHOT;
else if (strcmp(opt->name, "suiddir") == 0)
fsflags |= MNT_SUIDDIR;
else if (strcmp(opt->name, "sync") == 0)
==== //depot/projects/dtrace/src/sys/ufs/ffs/ffs_vfsops.c#24 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.340 2008/03/26 20:48:07 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.342 2008/05/24 00:41:32 rodrigc Exp $");
#include "opt_mac.h"
#include "opt_quota.h"
@@ -162,29 +162,15 @@
if (vfs_getopt(mp->mnt_optnew, "acls", NULL, NULL) == 0)
mntorflags |= MNT_ACLS;
- if (vfs_getopt(mp->mnt_optnew, "async", NULL, NULL) == 0)
- mntorflags |= MNT_ASYNC;
-
- if (vfs_getopt(mp->mnt_optnew, "force", NULL, NULL) == 0)
- mntorflags |= MNT_FORCE;
-
- if (vfs_getopt(mp->mnt_optnew, "multilabel", NULL, NULL) == 0)
- mntorflags |= MNT_MULTILABEL;
-
- if (vfs_getopt(mp->mnt_optnew, "noasync", NULL, NULL) == 0)
- mntandnotflags |= MNT_ASYNC;
-
- if (vfs_getopt(mp->mnt_optnew, "noatime", NULL, NULL) == 0)
- mntorflags |= MNT_NOATIME;
-
- if (vfs_getopt(mp->mnt_optnew, "noclusterr", NULL, NULL) == 0)
- mntorflags |= MNT_NOCLUSTERR;
-
- if (vfs_getopt(mp->mnt_optnew, "noclusterw", NULL, NULL) == 0)
- mntorflags |= MNT_NOCLUSTERW;
-
- if (vfs_getopt(mp->mnt_optnew, "snapshot", NULL, NULL) == 0)
+ if (vfs_getopt(mp->mnt_optnew, "snapshot", NULL, NULL) == 0) {
mntorflags |= MNT_SNAPSHOT;
+ /*
+ * Once we have set the MNT_SNAPSHOT flag, do not
+ * persist "snapshot" in the options list.
+ */
+ vfs_deleteopt(mp->mnt_optnew, "snapshot");
+ vfs_deleteopt(mp->mnt_opt, "snapshot");
+ }
MNT_ILOCK(mp);
mp->mnt_flag = (mp->mnt_flag | mntorflags) & ~mntandnotflags;
More information about the p4-projects
mailing list