mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
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.
This commit is contained in:
parent
d8f7b008a7
commit
c25215a737
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176823
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user