diff options
author | peter <peter@FreeBSD.org> | 1998-05-31 19:49:31 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-05-31 19:49:31 +0000 |
commit | 401c250cc40de5fcfc5f53856a8194793ba32667 (patch) | |
tree | 77292b0fb6150895d044dedafa84184c95243d2e /sys/nfsserver | |
parent | 5080277e0ee6d3017bdd8ac4e416ccef13a15697 (diff) | |
download | FreeBSD-src-401c250cc40de5fcfc5f53856a8194793ba32667.zip FreeBSD-src-401c250cc40de5fcfc5f53856a8194793ba32667.tar.gz |
Support 'mount -u' remounts. This may require disconnecting and rebinding
the socket. Certain mode changes are not allowed.
Obtained from: NetBSD
Diffstat (limited to 'sys/nfsserver')
-rw-r--r-- | sys/nfsserver/nfs.h | 3 | ||||
-rw-r--r-- | sys/nfsserver/nfs_srvsock.c | 15 | ||||
-rw-r--r-- | sys/nfsserver/nfsrvstats.h | 3 |
3 files changed, 18 insertions, 3 deletions
diff --git a/sys/nfsserver/nfs.h b/sys/nfsserver/nfs.h index ec0d530..a9fa37e 100644 --- a/sys/nfsserver/nfs.h +++ b/sys/nfsserver/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.37 1998/05/31 17:27:45 peter Exp $ + * $Id: nfs.h,v 1.38 1998/05/31 17:48:03 peter Exp $ */ #ifndef _NFS_NFS_H_ @@ -639,6 +639,7 @@ void nfsrv_updatecache __P((struct nfsrv_descript *, int, struct mbuf *)); void nfsrv_cleancache __P((void)); int nfs_connect __P((struct nfsmount *, struct nfsreq *)); void nfs_disconnect __P((struct nfsmount *)); +void nfs_safedisconnect __P((struct nfsmount *)); int nfs_getattrcache __P((struct vnode *, struct vattr *)); int nfsm_strtmbuf __P((struct mbuf **, char **, const char *, long)); int nfs_bioread __P((struct vnode *, struct uio *, int, struct ucred *, diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c index 45f2b61..8fcefeb 100644 --- a/sys/nfsserver/nfs_srvsock.c +++ b/sys/nfsserver/nfs_srvsock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.37 1998/05/31 18:06:07 peter Exp $ + * $Id: nfs_socket.c,v 1.38 1998/05/31 18:08:09 peter Exp $ */ /* @@ -371,6 +371,19 @@ nfs_disconnect(nmp) } } +void +nfs_safedisconnect(nmp) + struct nfsmount *nmp; +{ + struct nfsreq dummyreq; + + bzero(&dummyreq, sizeof(dummyreq)); + dummyreq.r_nmp = nmp; + nfs_rcvlock(&dummyreq); + nfs_disconnect(nmp); + nfs_rcvunlock(&nmp->nm_flag, &nmp->nm_state); +} + /* * This is the nfs send routine. For connection based socket types, it * must be called with an nfs_sndlock() on the socket. diff --git a/sys/nfsserver/nfsrvstats.h b/sys/nfsserver/nfsrvstats.h index ec0d530..a9fa37e 100644 --- a/sys/nfsserver/nfsrvstats.h +++ b/sys/nfsserver/nfsrvstats.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.37 1998/05/31 17:27:45 peter Exp $ + * $Id: nfs.h,v 1.38 1998/05/31 17:48:03 peter Exp $ */ #ifndef _NFS_NFS_H_ @@ -639,6 +639,7 @@ void nfsrv_updatecache __P((struct nfsrv_descript *, int, struct mbuf *)); void nfsrv_cleancache __P((void)); int nfs_connect __P((struct nfsmount *, struct nfsreq *)); void nfs_disconnect __P((struct nfsmount *)); +void nfs_safedisconnect __P((struct nfsmount *)); int nfs_getattrcache __P((struct vnode *, struct vattr *)); int nfsm_strtmbuf __P((struct mbuf **, char **, const char *, long)); int nfs_bioread __P((struct vnode *, struct uio *, int, struct ucred *, |