fix a deadlock during mount:
The client manager (venus) blocks in sys_mount() before entering its event loop answering requests from the kernel device (cfs). sys_mount() calls VFS_STATFS() internally which caused an upcall through cfs, which was never answered. Now don't consider the fs fully mounted before the VFS_START() was called at the vey end of sys_mount(). So VFS_STATFS() will return an error which is ignored.
This commit is contained in:
parent
eacc9ee5ce
commit
25df17af88
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cnode.h,v 1.11 2003/02/02 02:34:54 christos Exp $ */
|
||||
/* $NetBSD: cnode.h,v 1.12 2003/08/25 10:05:47 drochner Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -154,6 +154,7 @@ struct coda_mntinfo {
|
||||
struct vnode *mi_rootvp;
|
||||
struct mount *mi_vfsp;
|
||||
struct vcomm mi_vcomm;
|
||||
int mi_started;
|
||||
};
|
||||
extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */
|
||||
|
||||
@ -161,7 +162,8 @@ extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */
|
||||
* vfs pointer to mount info
|
||||
*/
|
||||
#define vftomi(vfsp) ((struct coda_mntinfo *)(vfsp->mnt_data))
|
||||
#define CODA_MOUNTED(vfsp) (vftomi((vfsp)) != (struct coda_mntinfo *)0)
|
||||
#define CODA_MOUNTED(vfsp) ((vftomi(vfsp) != (struct coda_mntinfo *)0) \
|
||||
&& (vftomi(vfsp)->mi_started))
|
||||
|
||||
/*
|
||||
* vnode pointer to mount info
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: coda_vfsops.c,v 1.27 2003/08/25 09:24:53 drochner Exp $ */
|
||||
/* $NetBSD: coda_vfsops.c,v 1.28 2003/08/25 10:05:46 drochner Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.27 2003/08/25 09:24:53 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.28 2003/08/25 10:05:46 drochner Exp $");
|
||||
|
||||
#ifdef _LKM
|
||||
#define NVCODA 4
|
||||
@ -278,6 +278,7 @@ coda_start(vfsp, flags, p)
|
||||
struct proc *p;
|
||||
{
|
||||
ENTRY;
|
||||
vftomi(vfsp)->mi_started = 1;
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -304,6 +305,8 @@ coda_unmount(vfsp, mntflags, p)
|
||||
#ifdef DEBUG
|
||||
printf("coda_unmount: ROOT: vp %p, cp %p\n", mi->mi_rootvp, VTOC(mi->mi_rootvp));
|
||||
#endif
|
||||
mi->mi_started = 0;
|
||||
|
||||
vrele(mi->mi_rootvp);
|
||||
|
||||
active = coda_kill(vfsp, NOT_DOWNCALL);
|
||||
|
Loading…
Reference in New Issue
Block a user