- Updated to latest upstream release, nfs-utils-1.1.1

- Added the removal of sm-notify.pid to nfslock init script.
- Changed spec file to use condrestart instead of condstop when calling
    init scripts.
This commit is contained in:
Steve Dickson 2008-01-05 14:27:40 +00:00
parent cf6d5cf995
commit c0c131bf03
12 changed files with 121 additions and 531 deletions

View File

@ -1,23 +0,0 @@
commit 12749181ceaa0711cc857b7639c0a559d5e65197
Author: Steve Dickson <steved@redhat.com>
Date: Thu May 10 11:54:59 2007 -0400
Close memory leak in mountd
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/support/export/client.c b/support/export/client.c
index 33dfdb0..5ffba63 100644
--- a/support/export/client.c
+++ b/support/export/client.c
@@ -262,6 +262,10 @@ client_compose(struct in_addr addr)
name = add_name(name, clp->m_hostname);
}
}
+
+ if (he != NULL)
+ free(he);
+
return name;
}

View File

@ -1,21 +0,0 @@
commit b028b29dc9f4b67e55cc8e0e91d2c0e2457564ed
Author: Steve Dickson <steved@redhat.com>
Date: Thu May 10 16:02:15 2007 -0400
Added missing unlock_mtab() call in the add_mtab()
routine.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 3831415..d3156b2 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -211,6 +211,7 @@ int add_mtab(char *fsname, char *mount_point, char *fstype, int flags, char *opt
lock_mtab();
if ((mtab = setmntent(MOUNTED, "a+")) == NULL) {
+ unlock_mtab();
fprintf(stderr, "Can't open " MOUNTED);
return 1;
}

View File

@ -1,23 +0,0 @@
commit 1c84f1f980ed36e95e0bc410a7955c569bf4b4d2
Author: Steve Dickson <steved@redhat.com>
Date: Thu May 10 15:04:07 2007 -0400
The wrong bit field is being passed to NFSCTL_TCPISSET()
during one of the sanity checks in rpc.nfsd.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index d0bbfb3..aaf8d29 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -118,7 +118,8 @@ main(int argc, char **argv)
fprintf(stderr, "no version specified\n");
exit(1);
}
- if (NFSCTL_VERISSET(versbits, 4) && !NFSCTL_TCPISSET(versbits)) {
+
+ if (NFSCTL_VERISSET(versbits, 4) && !NFSCTL_TCPISSET(protobits)) {
fprintf(stderr, "version 4 requires the TCP protocol\n");
exit(1);
}

View File

@ -1,11 +1,12 @@
--- nfs-utils-1.1.0/support/nfs/exports.c.orig 2007-05-10 23:40:57.000000000 -0400
+++ nfs-utils-1.1.0/support/nfs/exports.c 2007-07-16 09:13:40.000000000 -0400
@@ -355,7 +355,7 @@ static int valid_uuid(char *uuid)
static int
diff -up nfs-utils-1.1.1/support/nfs/exports.c.orig nfs-utils-1.1.1/support/nfs/exports.c
--- nfs-utils-1.1.1/support/nfs/exports.c.orig 2007-10-18 23:07:28.000000000 -0400
+++ nfs-utils-1.1.1/support/nfs/exports.c 2008-01-05 09:01:50.000000000 -0500
@@ -484,7 +484,7 @@ static int
parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr)
{
struct sec_entry *p;
- int had_subtree_opt = 0;
+ int had_subtree_opt = 1;
char *flname = efname?efname:"command line";
int flline = efp?efp->x_line:0;
unsigned int active = 0;

View File

@ -1,7 +1,7 @@
diff -up nfs-utils-1.1.0/support/nfs/xio.c.orig nfs-utils-1.1.0/support/nfs/xio.c
--- nfs-utils-1.1.0/support/nfs/xio.c.orig 2007-05-10 23:40:57.000000000 -0400
+++ nfs-utils-1.1.0/support/nfs/xio.c 2007-08-15 22:23:13.000000000 -0400
@@ -54,13 +54,20 @@ xflock(char *fname, char *type)
diff -up nfs-utils-1.1.1/support/nfs/xio.c.save nfs-utils-1.1.1/support/nfs/xio.c
--- nfs-utils-1.1.1/support/nfs/xio.c.save 2007-10-18 23:07:28.000000000 -0400
+++ nfs-utils-1.1.1/support/nfs/xio.c 2008-01-05 08:27:35.000000000 -0500
@@ -54,13 +54,19 @@ xflock(char *fname, char *type)
{
struct sigaction sa, oldsa;
int readonly = !strcmp(type, "r");
@ -9,15 +9,13 @@ diff -up nfs-utils-1.1.0/support/nfs/xio.c.orig nfs-utils-1.1.0/support/nfs/xio.
struct flock fl = { readonly? F_RDLCK : F_WRLCK, SEEK_SET, 0, 0, 0 };
int fd;
- if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) {
- xlog(L_WARNING, "could not open %s for locking", fname);
- if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT), 0644)) < 0) {
+ if (readonly)
+ fd = open(fname, O_RDONLY);
+ else
+ fd = open(fname, (O_RDWR|O_CREAT), mode);
+ if (fd < 0) {
+ xlog(L_WARNING, "could not %s %s for locking",
+ (readonly ? "open" : "create"), fname);
xlog(L_WARNING, "could not open %s for locking", fname);
return -1;
}
+

View File

@ -1,41 +0,0 @@
diff -up nfs-utils-1.1.0/configure.ac.orig nfs-utils-1.1.0/configure.ac
--- nfs-utils-1.1.0/configure.ac.orig 2007-05-10 23:40:57.000000000 -0400
+++ nfs-utils-1.1.0/configure.ac 2007-10-17 13:53:52.000000000 -0400
@@ -178,14 +178,14 @@ if test "$enable_nfsv4" = yes; then
AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
AC_CHECK_HEADERS(event.h, ,AC_MSG_ERROR([libevent needed for nfsv4 support]))
AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
- dnl librpcsecgss already has a dependency on libgssapi,
+ dnl librpcsecgss already has a dependency on libgssglue,
dnl but we need to make sure we get the right version
if test "$enable_gss" = yes; then
PKG_CHECK_MODULES(RPCSECGSS, librpcsecgss >= 0.10, ,
[AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. If you have pkgconfig installed, you might try setting environment variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
]
)
- PKG_CHECK_MODULES(GSSAPI, libgssapi >= 0.11)
+ PKG_CHECK_MODULES(GSSGLUE, libgssglue)
fi
fi
@@ -228,9 +228,9 @@ if test "$enable_gss" = yes; then
dnl This is not done until here because we need to have KRBLIBS set
dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS)
- AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), -lgssapi -ldl)
+ AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), -lgssglue -ldl)
AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level,
- AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, -lgssapi -ldl)
+ AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, -lgssglue -ldl)
fi
@@ -284,7 +284,7 @@ AC_CHECK_FUNCS([alarm atexit dup2 fdatas
dnl *************************************************************
-dnl Check for data sizes (XXX These should go away with libgssapi pkg-config)
+dnl Check for data sizes (XXX These should go away with libgssglue pkg-config)
dnl *************************************************************
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)

View File

@ -1,155 +0,0 @@
commit e916e9e47a6a932872641d0da1f7bd4927b63fee
Author: Steve Dickson <steved@redhat.com>
Date: Mon Aug 13 11:04:02 2007 -0400
Adds support for the 'nosharecache' mount option to nfs-utils.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/nfs.man b/utils/mount/nfs.man
index 673556c..e66daba 100644
--- a/utils/mount/nfs.man
+++ b/utils/mount/nfs.man
@@ -288,6 +288,23 @@ Mount the NFS filesystem using the UDP protocol.
Disables NFSv3 READDIRPLUS RPCs. Use this option when
mounting servers that don't support or have broken
READDIRPLUS implementations.
+.TP 1.5i
+.I nosharecache
+As of kernel 2.6.18, it is no longer possible to mount the same
+same filesystem with different mount options to a new mountpoint.
+It was deemed unsafe to do so, since cached data cannot be shared
+between the two mountpoints. In consequence, files or directories
+that were common to both mountpoint subtrees could often be seen to
+be out of sync following an update.
+.br
+This option allows administrators to select the pre-2.6.18 behaviour,
+permitting the same filesystem to be mounted with different mount
+options.
+.br
+.B Beware:
+Use of this option is not recommended unless you are certain that there
+are no hard links or subtrees of this mountpoint that are mounted
+elsewhere.
.P
All of the non-value options have corresponding nooption forms.
For example, nointr means don't allow file operations to be
@@ -444,6 +461,23 @@ This extracts a
server performance penalty but it allows two different NFS clients
to get reasonable good results when both clients are actively
writing to common filesystem on the server.
+.TP 1.5i
+.I nosharecache
+As of kernel 2.6.18, it is no longer possible to mount the same
+same filesystem with different mount options to a new mountpoint.
+It was deemed unsafe to do so, since cached data cannot be shared
+between the two mountpoints. In consequence, files or directories
+that were common to both mountpoint subtrees could often be seen to
+be out of sync following an update.
+.br
+This option allows administrators to select the pre-2.6.18 behaviour,
+permitting the same filesystem to be mounted with different mount
+options.
+.br
+.B Beware:
+Use of this option is not recommended unless you are certain that there
+are no hard links or subtrees of this mountpoint that are mounted
+elsewhere.
.P
All of the non-value options have corresponding nooption forms.
For example, nointr means don't allow file operations to be
diff --git a/utils/mount/nfs4_mount.h b/utils/mount/nfs4_mount.h
index 74c9b95..2fcca6d 100644
--- a/utils/mount/nfs4_mount.h
+++ b/utils/mount/nfs4_mount.h
@@ -65,6 +65,7 @@ struct nfs4_mount_data {
#define NFS4_MOUNT_NOCTO 0x0010 /* 1 */
#define NFS4_MOUNT_NOAC 0x0020 /* 1 */
#define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */
+#define NFS4_MOUNT_UNSHARED 0x8000 /* 5 */
#define NFS4_MOUNT_FLAGMASK 0xFFFF
/* pseudoflavors: */
diff --git a/utils/mount/nfs4mount.c b/utils/mount/nfs4mount.c
index 2a58d0a..0376f32 100644
--- a/utils/mount/nfs4mount.c
+++ b/utils/mount/nfs4mount.c
@@ -201,7 +201,7 @@ int nfs4mount(const char *spec, const char *node, int *flags,
char *s;
int val;
int bg, soft, intr;
- int nocto, noac;
+ int nocto, noac, unshared;
int retry;
int retval;
time_t timeout, t;
@@ -252,6 +252,7 @@ int nfs4mount(const char *spec, const char *node, int *flags,
intr = NFS4_MOUNT_INTR;
nocto = 0;
noac = 0;
+ unshared = 0;
retry = 10000; /* 10000 minutes ~ 1 week */
/*
@@ -336,6 +337,8 @@ int nfs4mount(const char *spec, const char *node, int *flags,
nocto = !val;
else if (!strcmp(opt, "ac"))
noac = !val;
+ else if (!strcmp(opt, "sharecache"))
+ unshared = !val;
else if (!sloppy) {
printf(_("unknown nfs mount option: "
"%s%s\n"), val ? "" : "no", opt);
@@ -347,7 +350,8 @@ int nfs4mount(const char *spec, const char *node, int *flags,
data.flags = (soft ? NFS4_MOUNT_SOFT : 0)
| (intr ? NFS4_MOUNT_INTR : 0)
| (nocto ? NFS4_MOUNT_NOCTO : 0)
- | (noac ? NFS4_MOUNT_NOAC : 0);
+ | (noac ? NFS4_MOUNT_NOAC : 0)
+ | (unshared ? NFS4_MOUNT_UNSHARED : 0);
/*
* Give a warning if the rpc.idmapd daemon is not running
@@ -388,11 +392,13 @@ int nfs4mount(const char *spec, const char *node, int *flags,
data.acregmin, data.acregmax, data.acdirmin, data.acdirmax);
printf("port = %d, bg = %d, retry = %d, flags = %.8x\n",
ntohs(server_addr.sin_port), bg, retry, data.flags);
- printf("soft = %d, intr = %d, nocto = %d, noac = %d\n",
+ printf("soft = %d, intr = %d, nocto = %d, noac = %d, "
+ "nosharecache = %d\n",
(data.flags & NFS4_MOUNT_SOFT) != 0,
(data.flags & NFS4_MOUNT_INTR) != 0,
(data.flags & NFS4_MOUNT_NOCTO) != 0,
- (data.flags & NFS4_MOUNT_NOAC) != 0);
+ (data.flags & NFS4_MOUNT_NOAC) != 0,
+ (data.flags & NFS4_MOUNT_UNSHARED) != 0);
if (num_flavour > 0) {
int pf_cnt, i;
diff --git a/utils/mount/nfs_mount.h b/utils/mount/nfs_mount.h
index 4a061d8..50ce2a8 100644
--- a/utils/mount/nfs_mount.h
+++ b/utils/mount/nfs_mount.h
@@ -64,6 +64,7 @@ struct nfs_mount_data {
#define NFS_MOUNT_NOACL 0x0800 /* 4 */
#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */
#define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */
+#define NFS_MOUNT_UNSHARED 0x8000 /* 5 */
/* security pseudoflavors */
diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c
index 815064a..f21aaff 100644
--- a/utils/mount/nfsmount.c
+++ b/utils/mount/nfsmount.c
@@ -804,6 +804,10 @@ parse_options(char *old_opts, struct nfs_mount_data *data,
data->flags &= ~NFS_MOUNT_NORDIRPLUS;
if (!val)
data->flags |= NFS_MOUNT_NORDIRPLUS;
+ } else if (!strcmp(opt, "sharecache")) {
+ data->flags &= ~NFS_MOUNT_UNSHARED;
+ if (!val)
+ data->flags |= NFS_MOUNT_UNSHARED;
#endif
} else {
bad_option:

View File

@ -1,77 +0,0 @@
--- nfs-utils-1.1.0/utils/mount/mount.c.orig 2007-07-18 16:26:01.000000000 -0400
+++ nfs-utils-1.1.0/utils/mount/mount.c 2007-07-18 16:37:34.000000000 -0400
@@ -286,17 +286,24 @@ static void parse_opts (const char *opti
}
}
-static void mount_error(char *node)
+static void mount_error(char *mount_point, char *node)
{
switch(errno) {
case ENOTDIR:
- fprintf(stderr, "%s: mount point %s is not a directory\n", progname, node);
+ fprintf(stderr, "%s: mount point %s is not a directory\n",
+ progname, mount_point);
break;
case EBUSY:
- fprintf(stderr, "%s: %s is already mounted or busy\n", progname, node);
+ fprintf(stderr, "%s: %s is already mounted or busy\n", progname,
+ mount_point);
break;
case ENOENT:
- fprintf(stderr, "%s: mount point %s does not exist\n", progname, node);
+ if (node)
+ fprintf(stderr, "%s: %s failed, reason given by server: %s\n",
+ progname, node, strerror(errno));
+ else
+ fprintf(stderr, "%s: mount point %s does not exist\n", progname,
+ mount_point);
break;
default:
fprintf(stderr, "%s: %s\n", progname, strerror(errno));
@@ -352,6 +359,26 @@ static int start_statd()
#endif
return 0;
}
+static int chk_mountpoint(char *mount_point)
+{
+ struct stat sb;
+
+ if (stat(mount_point, &sb) < 0){
+ mount_error(mount_point, NULL);
+ return 1;
+ }
+ if (S_ISDIR(sb.st_mode) == 0){
+ errno = ENOTDIR;
+ mount_error(mount_point, NULL);
+ return 1;
+ }
+ if (access(mount_point, X_OK) < 0) {
+ mount_error(mount_point, NULL);
+ return 1;
+ }
+
+ return 0;
+}
int main(int argc, char *argv[])
{
@@ -509,6 +536,9 @@ int main(int argc, char *argv[])
}
}
+ if (chk_mountpoint(mount_point))
+ exit(1);
+
if (nfs_mount_vers == 4)
mnt_err = nfs4mount(spec, mount_point, &flags, &extra_opts, &mount_opts, 0);
else {
@@ -539,7 +569,7 @@ int main(int argc, char *argv[])
mount_opts);
if (mnt_err) {
- mount_error(mount_point);
+ mount_error(mount_point, spec);
exit(EX_FAIL);
}
}

View File

@ -9,10 +9,10 @@ Date: Fri Jan 4 09:27:35 2008 -0500
Signed-off-by: Don Domingo <ddomingo@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
diff -up nfs-utils-1.1.0/utils/mount/nfs.man.orig nfs-utils-1.1.0/utils/mount/nfs.man
--- nfs-utils-1.1.0/utils/mount/nfs.man.orig 2007-12-17 08:16:15.000000000 -0500
+++ nfs-utils-1.1.0/utils/mount/nfs.man 2008-01-04 10:02:33.000000000 -0500
@@ -1,498 +1,1233 @@
diff -up nfs-utils-1.1.1/utils/mount/nfs.man.save nfs-utils-1.1.1/utils/mount/nfs.man
--- nfs-utils-1.1.1/utils/mount/nfs.man.save 2007-10-18 23:07:28.000000000 -0400
+++ nfs-utils-1.1.1/utils/mount/nfs.man 2008-01-05 08:34:22.000000000 -0500
@@ -1,510 +1,1233 @@
-.\" nfs.5 "Rick Sladkey" <jrs@world.std.com>
-.\" Wed Feb 8 12:52:42 1995, faith@cs.unc.edu: updates for Ross Biro's
-.\" patches. "
@ -853,77 +853,13 @@ diff -up nfs-utils-1.1.0/utils/mount/nfs.man.orig nfs-utils-1.1.0/utils/mount/nf
+and chooses an appropriate transport for each service.
+Refer to the TRANSPORT METHODS section for more details.
.TP 1.5i
-.I clientaddr=n
-On a multi-homed client, this
-causes the client to use a specific callback address when
-communicating with an NFS version 4 server.
-This option is currently ignored.
-.TP 1.5i
-.I sec=mode
-Same as \f3sec=mode\f1 for the nfs filesystem type (see above).
-.TP 1.5i
-.I bg
-If an NFS mount attempt times out, retry the mount
-in the background.
-After a mount operation is backgrounded, all subsequent mounts
-on the same NFS server will be backgrounded immediately, without
-first attempting the mount.
-A missing mount point is treated as a timeout,
-to allow for nested NFS mounts.
-.TP 1.5i
-.I fg
-If the first NFS mount attempt times out, retry the mount
-in the foreground.
-This is the complement of the
-.I bg
-option, and also the default behavior.
-.TP 1.5i
-.I soft
-If an NFS file operation has a major timeout then report an I/O error to
-the calling program.
-The default is to continue retrying NFS file operations indefinitely.
-.TP 1.5i
-.I hard
-If an NFS file operation has a major timeout then report
-"server not responding" on the console and continue retrying indefinitely.
-This is the default.
-.TP 1.5i
-.I intr
-If an NFS file operation has a major timeout and it is hard mounted,
-then allow signals to interupt the file operation and cause it to
-return EINTR to the calling program. The default is to not
-allow file operations to be interrupted.
-.TP 1.5i
-.I nocto
-Suppress the retrieval of new attributes when creating a file.
-.TP 1.5i
-.I noac
-Disable attribute caching, and force synchronous writes.
-This extracts a
-server performance penalty but it allows two different NFS clients
-to get reasonable good results when both clients are actively
-writing to common filesystem on the server.
-.TP 1.5i
-.I nosharecache
-As of kernel 2.6.18, it is no longer possible to mount the same
-same filesystem with different mount options to a new mountpoint.
-It was deemed unsafe to do so, since cached data cannot be shared
-between the two mountpoints. In consequence, files or directories
-that were common to both mountpoint subtrees could often be seen to
-be out of sync following an update.
-.br
-This option allows administrators to select the pre-2.6.18 behaviour,
-permitting the same filesystem to be mounted with different mount
-options.
-.br
-.B Beware:
-Use of this option is not recommended unless you are certain that there
-are no hard links or subtrees of this mountpoint that are mounted
-elsewhere.
-.P
-All of the non-value options have corresponding nooption forms.
-For example, nointr means don't allow file operations to be
-interrupted.
-.I clientaddr=n.n.n.n
-Specifies a single IPv4 address in dotted-quad form that
-the NFS client advertises to allow servers to perform
-NFSv4 callback requests against files on this mount point.
-If the server is not able to establish callback connections
-to clients, performance may degrade, or accesses to
-files may temporarily hang.
+.B udp
+The
+.B udp
@ -963,14 +899,16 @@ diff -up nfs-utils-1.1.0/utils/mount/nfs.man.orig nfs-utils-1.1.0/utils/mount/nf
+The mount request fails if the server's rpcbind service is not available,
+the server's mountd service is not registered with its rpcbind service,
+or the server's mountd service is not available on the advertised port.
+.IP
.IP
+This option can be used when mounting an NFS server
+through a firewall that blocks the rpcbind protocol.
+.TP 1.5i
+.BI mounthost= name
+The hostname of the host running mountd.
+If this option is not specified, the
+.BR mount (8)
If this option is not specified, the
.BR mount (8)
-command attempts to discover an appropriate callback
-address automatically.
+command assumes that the mountd service runs
+on the same host as the NFS service.
+.TP 1.5i
@ -1170,7 +1108,77 @@ diff -up nfs-utils-1.1.0/utils/mount/nfs.man.orig nfs-utils-1.1.0/utils/mount/nf
+If this option is not specified, the
+.BR mount (8)
+command attempts to discover an appropriate callback address automatically.
+The automatic discovery process is not perfect, however.
The automatic discovery process is not perfect, however.
-In the presence of multiple client network interfaces, special
-routing policies, or atypical network topologies, the exact
-address to use for callbacks may be nontrivial to determine,
-and should be explicitly set using this mount option.
-.TP 1.5i
-.I sec=mode
-Same as \f3sec=mode\f1 for the nfs filesystem type (see above).
-.TP 1.5i
-.I bg
-If an NFS mount attempt times out, retry the mount
-in the background.
-After a mount operation is backgrounded, all subsequent mounts
-on the same NFS server will be backgrounded immediately, without
-first attempting the mount.
-A missing mount point is treated as a timeout,
-to allow for nested NFS mounts.
-.TP 1.5i
-.I fg
-If the first NFS mount attempt times out, retry the mount
-in the foreground.
-This is the complement of the
-.I bg
-option, and also the default behavior.
-.TP 1.5i
-.I soft
-If an NFS file operation has a major timeout then report an I/O error to
-the calling program.
-The default is to continue retrying NFS file operations indefinitely.
-.TP 1.5i
-.I hard
-If an NFS file operation has a major timeout then report
-"server not responding" on the console and continue retrying indefinitely.
-This is the default.
-.TP 1.5i
-.I intr
-If an NFS file operation has a major timeout and it is hard mounted,
-then allow signals to interupt the file operation and cause it to
-return EINTR to the calling program. The default is to not
-allow file operations to be interrupted.
-.TP 1.5i
-.I nocto
-Suppress the retrieval of new attributes when creating a file.
-.TP 1.5i
-.I noac
-Disable attribute caching, and force synchronous writes.
-This extracts a
-server performance penalty but it allows two different NFS clients
-to get reasonable good results when both clients are actively
-writing to common filesystem on the server.
-.TP 1.5i
-.I nosharecache
-As of kernel 2.6.18, it is no longer possible to mount the same
-same filesystem with different mount options to a new mountpoint.
-It was deemed unsafe to do so, since cached data cannot be shared
-between the two mountpoints. In consequence, files or directories
-that were common to both mountpoint subtrees could often be seen to
-be out of sync following an update.
-.br
-This option allows administrators to select the pre-2.6.18 behaviour,
-permitting the same filesystem to be mounted with different mount
-options.
-.br
-.B Beware:
-Use of this option is not recommended unless you are certain that there
-are no hard links or subtrees of this mountpoint that are mounted
-elsewhere.
-.P
-All of the non-value options have corresponding nooption forms.
-For example, nointr means don't allow file operations to be
-interrupted.
+In the presence of multiple client network interfaces,
+special routing policies,
+or atypical network topologies,

View File

@ -1,70 +0,0 @@
commit 02968aa55972b680fa00273188da281d7612ca3e
Author: Steve Dickson <steved@redhat.com>
Date: Fri Sep 14 14:19:50 2007 -0400
Changed the default paths in sm-notify to
/var/lib/nfs/statd which is where the locking
state is kept in Red Hat distros.
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c
index 98c03f9..862889f 100644
--- a/utils/statd/sm-notify.c
+++ b/utils/statd/sm-notify.c
@@ -24,11 +24,13 @@
#include <errno.h>
#include <grp.h>
+#define STATD_PATH_XTN "statd/"
+
#ifndef BASEDIR
# ifdef NFS_STATEDIR
-# define BASEDIR NFS_STATEDIR
+# define BASEDIR NFS_STATEDIR "/" STATD_PATH_XTN
# else
-# define BASEDIR "/var/lib/nfs"
+# define BASEDIR "/var/lib/nfs" "/" STATD_PATH_XTN
# endif
#endif
diff --git a/utils/statd/sm-notify.man b/utils/statd/sm-notify.man
index dd03b8d..69b7059 100644
--- a/utils/statd/sm-notify.man
+++ b/utils/statd/sm-notify.man
@@ -33,7 +33,7 @@ but this is configurable.
For each NFS client or server machine to be monitored,
.B rpc.statd
creates a file in
-.BR /var/lib/nfs/sm ", "
+.BR /var/lib/nfs/statd/sm ", "
and removes the file if monitoring is no longer required.
.PP
When the machine is rebooted,
@@ -47,7 +47,7 @@ Each machine has an
which is basically an integer counter that is incremented
each time the machine reboots. This counter is stored
in
-.BR /var/lib/nfs/state ,
+.BR /var/lib/nfs/statd/state ,
and updated by
.BR sm-notify .
.SS Security
@@ -149,13 +149,13 @@ By default,
.B sm-notify
forks and puts itself in the background after obtaining the
list of hosts from
-.BR /var/lib/nfs/sm .
+.BR /var/lib/nfs/statd/sm .
.SH FILES
-.BR /var/lib/nfs/state
+.BR /var/lib/nfs/statd/state
.br
-.BR /var/lib/nfs/sm/*
+.BR /var/lib/nfs/statd/sm/*
.br
-.BR /var/lib/nfs/sm.bak/*
+.BR /var/lib/nfs/statd/sm.bak/*
.br
.BR /var/run/sm-notify.pid
.SH SEE ALSO

View File

@ -1,8 +1,8 @@
Summary: NFS utilities and supporting clients and daemons for the kernel NFS server
Name: nfs-utils
URL: http://sourceforge.net/projects/nfs
Version: 1.1.0
Release: 8%{?dist}
Version: 1.1.1
Release: 1%{?dist}
Epoch: 1
# group all 32bit related archs
@ -25,18 +25,11 @@ Source15: nfs.sysconfig
Patch00: nfs-utils-1.0.5-statdpath.patch
Patch01: nfs-utils-1.0.6-mountd.patch
Patch02: nfs-utils-1.0.6-gssd_mixed_case.patch
Patch03: nfs-utils-1.0.12-mountd-memleak.patch
Patch04: nfs-utils-1.0.12-nfsd-macargs.patch
Patch05: nfs-utils-1.0.12-mtab-mis-unlock.patch
Patch06: nfs-utils-1.1.0-exp-subtree-warn-off.patch
Patch07: nfs-utils-1.1.0-showmount-rpcerror.patch
Patch08: nfs-utils-1.1.0-mount-v4-errors.patch
Patch09: nfs-utils-1.1.0-mount-nosharecache.patch
Patch10: nfs-utils-1.1.0-exportfs-open.patch
Patch11: nfs-utils-1.1.0-smnotify-path.patch
Patch12: nfs-utils-1.1.0-exportfs-man-update.patch
Patch13: nfs-utils-1.1.0-gssglue.patch
Patch14: nfs-utils-1.1.0-nfs-man.patch
Patch03: nfs-utils-1.1.0-showmount-rpcerror.patch
Patch04: nfs-utils-1.1.0-exp-subtree-warn-off.patch
Patch05: nfs-utils-1.1.0-exportfs-open.patch
Patch06: nfs-utils-1.1.0-exportfs-man-update.patch
Patch07: nfs-utils-1.1.0-nfs-man.patch
%if %{enablefscache}
Patch90: nfs-utils-1.1.0-mount-fsc.patch
@ -97,13 +90,6 @@ This package also contains the mount.nfs and umount.nfs program.
%patch05 -p1
%patch06 -p1
%patch07 -p1
%patch08 -p1
%patch09 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%if %{enablefscache}
%patch90 -p1
@ -201,10 +187,10 @@ fi
%preun
if [ "$1" = "0" ]; then
/etc/rc.d/init.d/nfs condstop
/etc/rc.d/init.d/rpcgssd condstop
/etc/rc.d/init.d/rpcidmapd condstop
/etc/rc.d/init.d/nfslock condstop
/etc/rc.d/init.d/nfs condrestart
/etc/rc.d/init.d/rpcgssd condrestart
/etc/rc.d/init.d/rpcidmapd condrestart
/etc/rc.d/init.d/nfslock condrestart
/sbin/chkconfig --del rpcidmapd
/sbin/chkconfig --del rpcgssd
/sbin/chkconfig --del rpcsvcgssd
@ -274,8 +260,11 @@ fi
%attr(4755,root,root) /sbin/umount.nfs4
%changelog
* Fri Jan 4 2008 Steve Dickson <steved@redhat.com> 1.1.0-8
- Updated nfs(5) manual page.
* Sat Jan 5 2008 Steve Dickson <steved@redhat.com> 1.1.1-1
- Updated to latest upstream release, nfs-utils-1.1.1
- Added the removal of sm-notify.pid to nfslock init script.
- Changed spec file to use condrestart instead of condstop
when calling init scripts.
* Tue Dec 04 2007 Release Engineering <rel-eng at fedoraproject dot org> - 1.1.0-7
- Rebuild for openldap bump

View File

@ -55,6 +55,9 @@ start() {
if [ ! -f /var/lock/subsys/nfslock ]; then
# Start daemons.
if [ "$USERLAND_LOCKD" ]; then
# Make sure locks are recovered
rm -f /var/run/sm-notify.pid
echo -n $"Starting NFS locking: "
daemon rpc.lockd
echo
@ -98,6 +101,7 @@ stop() {
RETVAL=$?
echo
rm -f /var/lock/subsys/nfslock
rm -f /var/run/sm-notify.pid
return $RETVAL
}