Date: Thu, 26 Apr 2018 22:15:06 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r333044 - in projects/pnfs-planb-server/sys/fs: nfs nfsclient Message-ID: <201804262215.w3QMF6WX044951@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Thu Apr 26 22:15:06 2018 New Revision: 333044 URL: https://svnweb.freebsd.org/changeset/base/333044 Log: Fix the NFSv4.1 pNFS fex file mirror client's setting of vfs.nfs.pnfsiothreads so that the default isn't "disabled". Setting it negative makes it use a default number of 4 * ncpus, whereas setting it to 0 disables the use of threads for mirror I/O. Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c projects/pnfs-planb-server/sys/fs/nfsclient/nfs_clrpcops.c Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c Thu Apr 26 22:04:21 2018 (r333043) +++ projects/pnfs-planb-server/sys/fs/nfs/nfs_commonport.c Thu Apr 26 22:15:06 2018 (r333044) @@ -98,7 +98,7 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, debuglevel, CTLFLAG_RW, 0, "Debug level for NFS client"); SYSCTL_INT(_vfs_nfs, OID_AUTO, userhashsize, CTLFLAG_RDTUN, &nfsrv_lughashsize, 0, "Size of hash tables for uid/name mapping"); -int nfs_pnfsiothreads = 0; +int nfs_pnfsiothreads = -1; SYSCTL_INT(_vfs_nfs, OID_AUTO, pnfsiothreads, CTLFLAG_RW, &nfs_pnfsiothreads, 0, "Number of pNFS mirror I/O threads"); @@ -730,7 +730,7 @@ nfs_pnfsio(task_fn_t *func, void *context) pio = (struct pnfsio *)context; if (pnfsioq == NULL) { - if (nfs_pnfsiothreads == 0) + if (nfs_pnfsiothreads <= 0) nfs_pnfsiothreads = mp_ncpus * 4; pnfsioq = taskqueue_create("pnfsioq", M_WAITOK, taskqueue_thread_enqueue, &pnfsioq); Modified: projects/pnfs-planb-server/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 26 22:04:21 2018 (r333043) +++ projects/pnfs-planb-server/sys/fs/nfsclient/nfs_clrpcops.c Thu Apr 26 22:15:06 2018 (r333044) @@ -6476,7 +6476,7 @@ nfsio_writedsmir(vnode_t vp, int *iomode, int *must_co drpc->p = p; drpc->inprog = 0; ret = EIO; - if (nfs_pnfsiothreads > 0) { + if (nfs_pnfsiothreads != 0) { ret = nfs_pnfsio(start_writedsmir, drpc); NFSCL_DEBUG(4, "nfsio_writedsmir: nfs_pnfsio=%d\n", ret); } @@ -6655,7 +6655,7 @@ nfsio_commitds(vnode_t vp, uint64_t offset, int cnt, s drpc->p = p; drpc->inprog = 0; ret = EIO; - if (nfs_pnfsiothreads > 0) { + if (nfs_pnfsiothreads != 0) { ret = nfs_pnfsio(start_commitds, drpc); NFSCL_DEBUG(4, "nfsio_commitds: nfs_pnfsio=%d\n", ret); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804262215.w3QMF6WX044951>