Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174192585
D2506.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D2506.diff
View Options
Index: kern/vfs_mount.c
===================================================================
--- kern/vfs_mount.c
+++ kern/vfs_mount.c
@@ -537,6 +537,7 @@
struct vfsopt *opt, *tmp_opt;
char *fstype, *fspath, *errmsg;
int error, fstypelen, fspathlen, errmsg_len, errmsg_pos;
+ uint64_t fsflag_high;
errmsg = fspath = NULL;
errmsg_len = fspathlen = 0;
@@ -653,6 +654,20 @@
fsflags |= MNT_AUTOMOUNTED;
vfs_freeopt(optlist, opt);
}
+ else if (strcmp(opt->name, "fsflaghigh") == 0) {
+ /*
+ * This option allows a process doing a mount update
+ * to set all the high order 32bits of mnt_flag with
+ * one option. This is needed, since nmount(2)
+ * accepts an "int" option and, therefore, only takes
+ * the low order 32bits.
+ */
+ if (vfs_copyopt(optlist, "fsflaghigh",
+ &fsflag_high, sizeof(fsflag_high)) == 0 &&
+ (fsflag_high & 0xffffffffULL) == 0)
+ fsflags |= fsflag_high;
+ vfs_freeopt(optlist, opt);
+ }
}
/*
Index: usr.sbin/mountd/mountd.c
===================================================================
--- usr.sbin/mountd/mountd.c
+++ usr.sbin/mountd/mountd.c
@@ -1649,6 +1649,7 @@
int iovlen;
int done;
struct nfsex_args eargs;
+ uint64_t fsflag_high;
if (suspend_nfsd != 0)
(void)nfssvc(NFSSVC_SUSPENDNFSD, NULL);
@@ -1706,6 +1707,8 @@
build_iovec(&iov, &iovlen, "update", NULL, 0);
build_iovec(&iov, &iovlen, "export", &export, sizeof(export));
build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
+ build_iovec(&iov, &iovlen, "fsflaghigh", &fsflag_high,
+ sizeof(fsflag_high));
}
for (i = 0; i < num; i++) {
@@ -1736,6 +1739,9 @@
iov[3].iov_len = strlen(fsp->f_mntonname) + 1;
iov[5].iov_base = fsp->f_mntfromname;
iov[5].iov_len = strlen(fsp->f_mntfromname) + 1;
+ /* Use "fsflaghigh" to set the high order bits of f_flags. */
+ fsflag_high = (fsp->f_flags & 0xffffffff00000000ULL);
+
errmsg[0] = '\0';
/*
@@ -2394,6 +2400,7 @@
int i, iovlen;
int ret;
struct nfsex_args nfsea;
+ uint64_t fsflag_high;
eap = &nfsea.export;
@@ -2429,6 +2436,12 @@
build_iovec(&iov, &iovlen, "export", eap,
sizeof (struct export_args));
build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
+
+ /* Use "fsflaghigh" to set the high order bits of f_flags. */
+ fsflag_high = (fsb->f_flags & 0xffffffff00000000ULL);
+ if (fsflag_high != 0)
+ build_iovec(&iov, &iovlen, "fsflaghigh", &fsflag_high,
+ sizeof(fsflag_high));
}
while (!done) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 2, 6:47 AM (10 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40045794
Default Alt Text
D2506.diff (2 KB)
Attached To
Mode
D2506: Mount option to set high order mnt_flag bits
Attached
Detach File
Event Timeline
Log In to Comment