Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F116053125
D35407.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35407.diff
View Options
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -73,6 +73,7 @@
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -160,7 +161,9 @@
char mntpath[MAXPATHLEN], errmsg[255];
char hostname[MAXHOSTNAMELEN + 1], gssn[MAXHOSTNAMELEN + 50];
const char *gssname, *nmount_errstr;
+ bool softintr;
+ softintr = false;
iov = NULL;
iovlen = 0;
memset(errmsg, 0, sizeof(errmsg));
@@ -210,6 +213,7 @@
case 'i':
printf("-i deprecated, use -o intr\n");
build_iovec(&iov, &iovlen, "intr", NULL, 0);
+ softintr = true;
break;
case 'L':
printf("-L deprecated, use -o nolockd\n");
@@ -366,6 +370,10 @@
"value -- %s", val);
}
pass_flag_to_nmount=0;
+ } else if (strcmp(opt, "soft") == 0) {
+ softintr = true;
+ } else if (strcmp(opt, "intr") == 0) {
+ softintr = true;
}
if (pass_flag_to_nmount) {
build_iovec(&iov, &iovlen, opt,
@@ -395,6 +403,7 @@
case 's':
printf("-s deprecated, use -o soft\n");
build_iovec(&iov, &iovlen, "soft", NULL, 0);
+ softintr = true;
break;
case 'T':
nfsproto = IPPROTO_TCP;
@@ -433,6 +442,11 @@
/* NOTREACHED */
}
+ /* Warn that NFSv4 mounts only work correctly as hard mounts. */
+ if (mountmode == V4 && softintr)
+ warnx("Warning, options soft and/or intr cannot be safely used"
+ " for NFSv4. See the BUGS section of mount_nfs(8)");
+
spec = *argv++;
mntname = *argv;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 3, 3:21 AM (13 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17917847
Default Alt Text
D35407.diff (1 KB)
Attached To
Mode
D35407: Add a warning message w.r.t. using soft, intr options for NFSv4 mounts
Attached
Detach File
Event Timeline
Log In to Comment