summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-09-12 19:06:08 +0000
committerkib <kib@FreeBSD.org>2010-09-12 19:06:08 +0000
commit131282cc47f43ec1f723472b37d855802e379b11 (patch)
treee048d7e13f369bc09408da0ceef36b4fd79b6dac /sys/nfsclient/nfs.h
parent7ad5ac6559c0245da0e841850e65a611a2530cfd (diff)
downloadFreeBSD-src-131282cc47f43ec1f723472b37d855802e379b11.zip
FreeBSD-src-131282cc47f43ec1f723472b37d855802e379b11.tar.gz
Do not fork nfsiod directly from the vop methods. This causes LORs between
vnode lock and several locks needed during fork, like fd lock. Instead, schedule the task to be executed in the taskqueue context. We still waiting for the fork to finish, but the context of the thread executing the task does not make real LORs with our vnode lock. Submitted by: pluknet at gmail com Reviewed by: jhb Tested by: pho MFC after: 3 weeks
Diffstat (limited to 'sys/nfsclient/nfs.h')
-rw-r--r--sys/nfsclient/nfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h
index 6f6e0d33..da61175 100644
--- a/sys/nfsclient/nfs.h
+++ b/sys/nfsclient/nfs.h
@@ -125,6 +125,7 @@ extern struct uma_zone *nfsmount_zone;
extern struct nfsstats nfsstats;
extern struct mtx nfs_iod_mtx;
+extern struct task nfs_nfsiodnew_task;
extern int nfs_numasync;
extern unsigned int nfs_iodmax;
@@ -253,6 +254,7 @@ int nfs_commit(struct vnode *vp, u_quad_t offset, int cnt,
struct ucred *cred, struct thread *td);
int nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *);
int nfs_nfsiodnew(int);
+void nfs_nfsiodnew_tq(__unused void *, int);
int nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *);
int nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *);
void nfs_doio_directwrite (struct buf *);
OpenPOWER on IntegriCloud