mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
Finish making 'wcommitsize' an NFS client mount option.
Reviewed by: rmacklem MFC after: 1 week
This commit is contained in:
parent
579905d87c
commit
840fb1c02b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227507
@ -318,6 +318,10 @@ tune the timeout
|
||||
interval.)
|
||||
.It Cm udp
|
||||
Use UDP transport.
|
||||
.It Cm wcommitsize Ns = Ns Aq Ar value
|
||||
Set the maximum pending write commit size to the specified value.
|
||||
This determines the maximum amount of pending write data that the NFS
|
||||
client is willing to cache for each file.
|
||||
.It Cm wsize Ns = Ns Aq Ar value
|
||||
Set the write data size to the specified value.
|
||||
Ditto the comments w.r.t.\& the
|
||||
|
@ -612,6 +612,13 @@ fallback_mount(struct iovec *iov, int iovlen, int mntflags)
|
||||
}
|
||||
args.flags |= NFSMNT_ACDIRMAX;
|
||||
}
|
||||
if (findopt(iov, iovlen, "wcommitsize", &opt, NULL) == 0) {
|
||||
ret = sscanf(opt, "%d", &args.wcommitsize);
|
||||
if (ret != 1 || args.wcommitsize < 0) {
|
||||
errx(1, "illegal wcommitsize: %s", opt);
|
||||
}
|
||||
args.flags |= NFSMNT_WCOMMITSIZE;
|
||||
}
|
||||
if (findopt(iov, iovlen, "deadthresh", &opt, NULL) == 0) {
|
||||
ret = sscanf(opt, "%d", &args.deadthresh);
|
||||
if (ret != 1 || args.deadthresh <= 0) {
|
||||
|
@ -715,7 +715,7 @@ static const char *nfs_opts[] = { "from", "nfs_args",
|
||||
"retrans", "acregmin", "acregmax", "acdirmin", "acdirmax", "resvport",
|
||||
"readahead", "hostname", "timeout", "addr", "fh", "nfsv3", "sec",
|
||||
"principal", "nfsv4", "gssname", "allgssname", "dirpath",
|
||||
"negnametimeo", "nocto",
|
||||
"negnametimeo", "nocto", "wcommitsize",
|
||||
NULL };
|
||||
|
||||
/*
|
||||
@ -949,6 +949,15 @@ nfs_mount(struct mount *mp)
|
||||
}
|
||||
args.flags |= NFSMNT_ACDIRMAX;
|
||||
}
|
||||
if (vfs_getopt(mp->mnt_optnew, "wcommitsize", (void **)&opt, NULL) == 0) {
|
||||
ret = sscanf(opt, "%d", &args.wcommitsize);
|
||||
if (ret != 1 || args.wcommitsize < 0) {
|
||||
vfs_mount_error(mp, "illegal wcommitsize: %s", opt);
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
args.flags |= NFSMNT_WCOMMITSIZE;
|
||||
}
|
||||
if (vfs_getopt(mp->mnt_optnew, "timeout", (void **)&opt, NULL) == 0) {
|
||||
ret = sscanf(opt, "%d", &args.timeo);
|
||||
if (ret != 1 || args.timeo <= 0) {
|
||||
|
@ -787,7 +787,7 @@ static const char *nfs_opts[] = { "from", "nfs_args",
|
||||
"readahead", "readdirsize", "soft", "hard", "mntudp", "tcp", "udp",
|
||||
"wsize", "rsize", "retrans", "acregmin", "acregmax", "acdirmin",
|
||||
"acdirmax", "deadthresh", "hostname", "timeout", "addr", "fh", "nfsv3",
|
||||
"sec", "maxgroups", "principal", "negnametimeo", "nocto",
|
||||
"sec", "maxgroups", "principal", "negnametimeo", "nocto", "wcommitsize",
|
||||
NULL };
|
||||
|
||||
/*
|
||||
@ -1019,6 +1019,15 @@ nfs_mount(struct mount *mp)
|
||||
}
|
||||
args.flags |= NFSMNT_ACDIRMAX;
|
||||
}
|
||||
if (vfs_getopt(mp->mnt_optnew, "wcommitsize", (void **)&opt, NULL) == 0) {
|
||||
ret = sscanf(opt, "%d", &args.wcommitsize);
|
||||
if (ret != 1 || args.wcommitsize < 0) {
|
||||
vfs_mount_error(mp, "illegal wcommitsize: %s", opt);
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
args.flags |= NFSMNT_WCOMMITSIZE;
|
||||
}
|
||||
if (vfs_getopt(mp->mnt_optnew, "deadthresh", (void **)&opt, NULL) == 0) {
|
||||
ret = sscanf(opt, "%d", &args.deadthresh);
|
||||
if (ret != 1 || args.deadthresh <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user