summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2008-03-05 09:41:22 +0000
committerrodrigc <rodrigc@FreeBSD.org>2008-03-05 09:41:22 +0000
commitb3c805a899bc1bf721470e47dacd778e2dd77842 (patch)
tree13fda9b4a6e6112a63d46bdfa846c3d6929274cb /sys
parentfbbd44cc2de010dead74208bea6cbd581cf92150 (diff)
downloadFreeBSD-src-b3c805a899bc1bf721470e47dacd778e2dd77842.zip
FreeBSD-src-b3c805a899bc1bf721470e47dacd778e2dd77842.tar.gz
In nfs_mount(), default initialize struct nfs_args
the same way that it is default initialized in revision 1.77 of mount_nfs.c. Right now, this is a no-op, because currently we initialize struct nfs_args in mount_nfs in userspace, and pass it down into the kernel via nmount(), so we overwrite whatever we initialize here with the value passed in from userspace. However, this lays the groundwork for moving away from passing struct nfs_args from userspace to kernel via nmount(), so that we can instead pass string mount options via nmount() which can be parsed in the kernel. This will make it easier to add new NFS mount options.
Diffstat (limited to 'sys')
-rw-r--r--sys/nfsclient/nfs_vfsops.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 1353871..eddf478 100644
--- a/sys/nfsclient/nfs_vfsops.c
+++ b/sys/nfsclient/nfs_vfsops.c
@@ -719,8 +719,32 @@ static const char *nfs_opts[] = { "from", "nfs_args",
static int
nfs_mount(struct mount *mp, struct thread *td)
{
+ struct nfs_args args = {
+ .version = NFS_ARGSVERSION,
+ .addr = NULL,
+ .addrlen = sizeof (struct sockaddr_in),
+ .sotype = SOCK_STREAM,
+ .proto = 0,
+ .fh = NULL,
+ .fhsize = 0,
+ .flags = NFSMNT_RESVPORT,
+ .wsize = NFS_WSIZE,
+ .rsize = NFS_RSIZE,
+ .readdirsize = NFS_READDIRSIZE,
+ .timeo = 10,
+ .retrans = NFS_RETRANS,
+ .maxgrouplist = NFS_MAXGRPS,
+ .readahead = NFS_DEFRAHEAD,
+ .wcommitsize = 0, /* was: NQ_DEFLEASE */
+ .deadthresh = NFS_MAXDEADTHRESH, /* was: NQ_DEADTHRESH */
+ .hostname = NULL,
+ /* args version 4 */
+ .acregmin = NFS_MINATTRTIMO,
+ .acregmax = NFS_MAXATTRTIMO,
+ .acdirmin = NFS_MINDIRATTRTIMO,
+ .acdirmax = NFS_MAXDIRATTRTIMO,
+ };
int error;
- struct nfs_args args;
struct sockaddr *nam;
struct vnode *vp;
char hst[MNAMELEN];
OpenPOWER on IntegriCloud