Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/am-utils resolve conflicts.
details: https://anonhg.NetBSD.org/src/rev/a6c2359ae320
branches: trunk
changeset: 544033:a6c2359ae320
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 09 01:38:38 2003 +0000
description:
resolve conflicts.
diffstat:
dist/am-utils/amd/amd.8 | 6 +-
dist/am-utils/amd/amd.c | 18 +-
dist/am-utils/amd/amfs_auto.c | 435 +++++++++++++---------------
dist/am-utils/amd/amq_subr.c | 6 +-
dist/am-utils/amd/map.c | 58 +--
dist/am-utils/amd/nfs_start.c | 6 +-
dist/am-utils/amd/opts.c | 10 +-
dist/am-utils/amd/sched.c | 6 +-
dist/am-utils/amd/srvr_nfs.c | 95 ++++--
dist/am-utils/amd2netbsd | 2 +-
dist/am-utils/amq/amq.8 | 6 +-
dist/am-utils/amq/amq.c | 19 +-
dist/am-utils/amq/pawd.1 | 6 +-
dist/am-utils/conf/transp/transp_sockets.c | 81 +++++-
dist/am-utils/doc/am-utils.texi | 64 ++-
dist/am-utils/fixmount/fixmount.8 | 6 +-
dist/am-utils/fsinfo/fsi_analyze.c | 6 +-
dist/am-utils/fsinfo/fsi_lex.l | 6 +-
dist/am-utils/fsinfo/fsi_util.c | 6 +-
dist/am-utils/fsinfo/fsinfo.8 | 6 +-
dist/am-utils/fsinfo/fsinfo.c | 6 +-
dist/am-utils/fsinfo/fsinfo.h | 6 +-
dist/am-utils/fsinfo/wr_fstab.c | 6 +-
dist/am-utils/hlfsd/hlfsd.8 | 6 +-
dist/am-utils/hlfsd/hlfsd.c | 108 ++----
dist/am-utils/hlfsd/hlfsd.h | 6 +-
dist/am-utils/include/am_defs.h | 39 +-
dist/am-utils/include/am_utils.h | 48 +-
dist/am-utils/include/amq_defs.h | 6 +-
dist/am-utils/libamu/hasmntopt.c | 10 +-
dist/am-utils/libamu/misc_rpc.c | 15 +-
dist/am-utils/libamu/mount_fs.c | 50 +-
dist/am-utils/libamu/wire.c | 6 +-
dist/am-utils/libamu/xutil.c | 99 ++----
dist/am-utils/mk-amd-map/mk-amd-map.8 | 6 +-
dist/am-utils/scripts/amd.conf.5 | 10 +-
dist/am-utils/scripts/automount2amd.8 | 6 +-
dist/am-utils/scripts/expn.1 | 16 +-
dist/am-utils/scripts/expn.in | 16 +-
dist/am-utils/wire-test/wire-test.8 | 6 +-
40 files changed, 670 insertions(+), 649 deletions(-)
diffs (truncated from 3136 to 300 lines):
diff -r cc0e765c4a95 -r a6c2359ae320 dist/am-utils/amd/amd.8
--- a/dist/am-utils/amd/amd.8 Sun Mar 09 01:36:38 2003 +0000
+++ b/dist/am-utils/amd/amd.8 Sun Mar 09 01:38:38 2003 +0000
@@ -1,7 +1,7 @@
-.\" $NetBSD: amd.8,v 1.3 2002/11/29 23:06:22 christos Exp $
+.\" $NetBSD: amd.8,v 1.4 2003/03/09 01:38:39 christos Exp $
.\"
.\"
-.\" Copyright (c) 1997-2002 Erez Zadok
+.\" Copyright (c) 1997-2003 Erez Zadok
.\" Copyright (c) 1989 Jan-Simon Pendry
.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1989 The Regents of the University of California.
@@ -40,7 +40,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" Id: amd.8,v 1.7 2002/06/22 20:52:44 ezk Exp
+.\" Id: amd.8,v 1.8 2002/12/27 22:43:46 ezk Exp
.\"
.TH AMD 8 "3 November 1989"
.SH NAME
diff -r cc0e765c4a95 -r a6c2359ae320 dist/am-utils/amd/amd.c
--- a/dist/am-utils/amd/amd.c Sun Mar 09 01:36:38 2003 +0000
+++ b/dist/am-utils/amd/amd.c Sun Mar 09 01:38:38 2003 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: amd.c,v 1.4 2002/11/29 23:06:22 christos Exp $ */
+/* $NetBSD: amd.c,v 1.5 2003/03/09 01:38:39 christos Exp $ */
/*
- * Copyright (c) 1997-2002 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
*
- * Id: amd.c,v 1.19 2002/06/23 01:05:38 ib42 Exp
+ * Id: amd.c,v 1.23 2002/12/27 22:43:46 ezk Exp
*
*/
@@ -299,6 +299,9 @@
/* LDAP cache */
gopt.ldap_cache_seconds = 0;
gopt.ldap_cache_maxmem = 131072;
+
+ /* LDAP protocol version */
+ gopt.ldap_proto_version = 2;
#endif /* HAVE_MAP_LDAP */
#ifdef HAVE_MAP_NIS
@@ -369,11 +372,6 @@
going_down(1);
}
-#ifdef DEBUG
- /* initialize debugging flags (Register AMQ, Enter daemon mode) */
- debug_flags = D_AMQ | D_DAEMON;
-#endif /* DEBUG */
-
/*
* Initialize global options structure.
*/
@@ -554,9 +552,7 @@
}
#endif /* HAVE_MAP_NIS */
-#ifdef DEBUG
- amuDebug(D_DAEMON)
-#endif /* DEBUG */
+ if (!amuDebug(D_DAEMON))
ppid = daemon_mode();
sprintf(pid_fsname, "%s:(pid%ld)", am_get_hostname(), (long) am_mypid);
diff -r cc0e765c4a95 -r a6c2359ae320 dist/am-utils/amd/amfs_auto.c
--- a/dist/am-utils/amd/amfs_auto.c Sun Mar 09 01:36:38 2003 +0000
+++ b/dist/am-utils/amd/amfs_auto.c Sun Mar 09 01:38:38 2003 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: amfs_auto.c,v 1.2 2002/11/29 23:08:32 christos Exp $ */
+/* $NetBSD: amfs_auto.c,v 1.3 2003/03/09 01:38:39 christos Exp $ */
/*
- * Copyright (c) 1997-2002 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
*
- * Id: amfs_auto.c,v 1.48 2002/06/23 15:12:09 ib42 Exp
+ * Id: amfs_auto.c,v 1.58 2003/01/25 01:46:23 ib42 Exp
*
*/
@@ -68,7 +68,7 @@
/****************************************************************************
*** FORWARD DEFINITIONS ***
****************************************************************************/
-static int amfs_auto_bgmount(struct continuation *cp, int mpe);
+static int amfs_auto_bgmount(struct continuation *cp);
static int amfs_auto_mount(am_node *mp, mntfs *mf);
static int amfs_auto_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, int count, int fully_browsable);
static mntfs **amfs_auto_lookup_mntfs(am_node *new_mp, int *error_return);
@@ -190,7 +190,7 @@
if (mf->mf_fo->opt_pref) {
/* allow pref:=null to set a real null prefix */
if (STREQ(mf->mf_fo->opt_pref, "null")) {
- mp->am_pref = "";
+ mp->am_pref = strdup("");
} else {
/*
* the prefix specified as an option
@@ -253,20 +253,8 @@
int error = 0;
#ifdef HAVE_FS_AUTOFS
- if (mf->mf_flags & MFF_AUTOFS) {
+ if (mf->mf_flags & MFF_AUTOFS)
error = UMOUNT_FS(mp->am_path, mf->mf_real_mount, mnttab_file_name);
- /*
- * autofs mounts are in place, so it is possible
- * that we can't just unmount our mount points and go away.
- * If that's the case, just give up.
- */
- if (error == EBUSY)
- goto out;
-
- autofs_release_fh(mf->mf_autofs_fh);
- mf->mf_autofs_fh = 0;
- }
- out:
#endif /* HAVE_FS_AUTOFS */
return error;
@@ -281,6 +269,7 @@
{
mntfs **mf;
+ dlog("free_continuation");
if (cp->callout)
untimeout(cp->callout);
/*
@@ -289,7 +278,8 @@
* or free all but the used one, if the mount succeeded.
*/
for (mf = cp->mp->am_mfarray; *mf; mf++)
- if (cp->mp->am_error || cp->mp->am_mnt != *mf)
+ /* don't free the mntfs attached to the am_node */
+ if (cp->mp->am_mnt != *mf)
free_mntfs(*mf);
XFREE(cp->mp->am_mfarray);
cp->mp->am_mfarray = 0;
@@ -298,12 +288,14 @@
/*
- * Discard the underlying mount point and replace
- * with a reference to an error filesystem.
+ * Replace mount point with a reference to an error filesystem.
+ * The mount point (struct mntfs) is NOT discarded,
+ * the caller must do it if it wants to _before_ calling this function.
*/
void
assign_error_mntfs(am_node *mp)
{
+ dlog("assign_error_mntfs");
if (mp->am_error > 0) {
/*
* Save the old error code
@@ -312,10 +304,6 @@
if (error <= 0)
error = mp->am_mnt->mf_error;
/*
- * Discard the old filesystem
- */
- free_mntfs(mp->am_mnt);
- /*
* Allocate a new error reference
*/
mp->am_mnt = new_mntfs();
@@ -402,7 +390,7 @@
}
if (mf->mf_flags & MFF_NFS_SCALEDOWN)
- amfs_auto_bgmount(cp, 0);
+ amfs_auto_bgmount(cp);
else {
/*
* If we get here then that attempt didn't work, so
@@ -412,13 +400,14 @@
amd_stats.d_merr++;
cp->mf++;
xmp = cp->mp;
- amfs_auto_bgmount(cp, 0);
+ amfs_auto_bgmount(cp);
assign_error_mntfs(xmp);
}
} else {
/*
* The mount worked.
*/
+ dlog("Mounting %s returned success", cp->mp->am_path);
am_mounted(cp->mp);
free_continuation(cp);
}
@@ -453,9 +442,9 @@
/* explicitly forbid further retries after timeout */
cp->retry = FALSE;
}
- if (error || !IN_PROGRESS(cp)) {
- (void) amfs_auto_bgmount(cp, error);
- }
+ if (error || !IN_PROGRESS(cp))
+ amfs_auto_bgmount(cp);
+
reschedule_timeout_mp();
}
@@ -492,20 +481,18 @@
fetch next mount location
if the filesystem failed to be mounted then
this_error = error from filesystem
- elif the filesystem is mounting or unmounting then
- this_error = -1
- elif the fileserver is down then
- this_error = -1
- elif the filesystem is already mounted
- this_error = 0
+ goto failed
+ if the filesystem is mounting or unmounting then
+ goto retry;
+ if the fileserver is down then
+ this_error = EIO
+ continue;
+ if the filesystem is already mounted
break
fi
- if no error on this mount then
- this_error = initialize mount point
- fi
- if file server is down then
- this_error = -1
- fi
+
+ this_error = initialize mount point
+
if no error on this mount and mount is delayed then
this_error = -1
fi
@@ -527,13 +514,12 @@
endfor
*/
static int
-amfs_auto_bgmount(struct continuation *cp, int mp_error)
+amfs_auto_bgmount(struct continuation *cp)
{
am_node *mp = cp->mp;
- mntfs *mf = mp->am_mnt; /* Current mntfs */
- mntfs *mf_retry = 0; /* First mntfs which needed retrying */
+ mntfs *mf; /* Current mntfs */
int this_error = -1; /* Per-mount error */
- int hard_error = -1;
+ int hard_error = -1; /* Cumulative per-node error */
/*
* Try to mount each location.
@@ -542,15 +528,15 @@
* hard_error > 0 indicates everything failed with a hard error
* hard_error < 0 indicates nothing could be mounted now
*/
- for (; this_error && *cp->mf; cp->mf++) {
+ for (mp->am_mnt = *cp->mf; *cp->mf; cp->mf++, mp->am_mnt = *cp->mf) {
am_ops *p;
- int retry;
- mf = mp->am_mnt = *cp->mf;
+ mf = mp->am_mnt;
p = mf->mf_ops;
if (hard_error < 0)
hard_error = this_error;
+ this_error = 0;
if (mf->mf_fo->fs_mtab) {
plog(XLOG_MAP, "Trying mount of %s on %s fstype %s mount_type %s",
@@ -558,9 +544,6 @@
mp->am_parent->am_mnt->mf_fo ? mp->am_parent->am_mnt->mf_fo->opt_mount_type : "root");
}
- this_error = 0;
- retry = TRUE;
-
if (mp->am_link) {
XFREE(mp->am_link);
mp->am_link = 0;
Home |
Main Index |
Thread Index |
Old Index