From c20e37e81a2006a8ecfc2b09616eb4fe8e21d1d9 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Thu, 28 Jan 2010 16:17:24 +0000 Subject: Patch the experimental NFS client in a manner analogous to r203072 for the regular NFS client. Also, delete two fields of struct nfsmount that are not used by the FreeBSD port of the client. MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clbio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/fs/nfsclient/nfs_clbio.c') diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 3193822..d0dd2cc 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -63,7 +63,7 @@ extern int newnfs_directio_allow_mmap; extern struct nfsstats newnfsstats; extern struct mtx ncl_iod_mutex; extern int ncl_numasync; -extern struct proc *ncl_iodwant[NFS_MAXRAHEAD]; +extern enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD]; extern struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD]; extern int newnfs_directio_enable; @@ -1396,7 +1396,7 @@ again: * Find a free iod to process this request. */ for (iod = 0; iod < ncl_numasync; iod++) - if (ncl_iodwant[iod]) { + if (ncl_iodwant[iod] == NFSIOD_AVAILABLE) { gotiod = TRUE; break; } @@ -1405,7 +1405,7 @@ again: * Try to create one if none are free. */ if (!gotiod) { - iod = ncl_nfsiodnew(); + iod = ncl_nfsiodnew(1); if (iod != -1) gotiod = TRUE; } @@ -1417,7 +1417,7 @@ again: */ NFS_DPF(ASYNCIO, ("ncl_asyncio: waking iod %d for mount %p\n", iod, nmp)); - ncl_iodwant[iod] = NULL; + ncl_iodwant[iod] = NFSIOD_NOT_AVAILABLE; ncl_iodmount[iod] = nmp; nmp->nm_bufqiods++; wakeup(&ncl_iodwant[iod]); -- cgit v1.1