diff options
author | Milind Changire <mchangir@redhat.com> | 2017-10-19 11:49:42 +0530 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-11-06 16:46:33 +0000 |
commit | 6707eddaa5d7fdce16d39c19963911868a2c7fee (patch) | |
tree | 42bfa718a33a13007d967e4a70242afc7f986c1b /xlators/nfs | |
parent | ed5e7b48f9255a57e0a691c102a207eb2445e8b7 (diff) |
rpc: optimize fop program lookup
Ensure that the fop program is the first in the program list
so that there's minimum amount of time spent to search the
program for the most frequently needed use case.
Change-Id: I45c3dcdbf39ec90ba39d914432d13a2ace00a5ee
BUG: 1509647
Signed-off-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index daa8366f19a..1f637fd6091 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -98,7 +98,7 @@ nfs_init_version (xlator_t *this, nfs_version_initer_t init, gf_msg_debug (GF_NFS, 0, "Starting program: %s", prog->progname); - ret = rpcsvc_program_register (nfs->rpcsvc, prog); + ret = rpcsvc_program_register (nfs->rpcsvc, prog, _gf_false); if (ret == -1) { gf_msg (GF_NFS, GF_LOG_ERROR, 0, NFS_MSG_PGM_INIT_FAIL, "Program: %s init failed", prog->progname); @@ -321,7 +321,7 @@ nfs_init_versions (struct nfs_state *nfs, xlator_t *this) gf_msg_debug (GF_NFS, 0, "Starting program: %s", prog->progname); - ret = rpcsvc_program_register (nfs->rpcsvc, prog); + ret = rpcsvc_program_register (nfs->rpcsvc, prog, _gf_false); if (ret == -1) { gf_msg (GF_NFS, GF_LOG_ERROR, 0, NFS_MSG_PGM_INIT_FAIL, |