Actions
Bug #6257
closedFirst nfsauth_retrieve() is never cached in nfsauth_cache_get()
Start date:
2015-09-22
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
Description
During some testing I noticed that the first nfsauth_retrieve() from nfsauth_cache_get() is never cached, so for every client I saw two nfsauth_retrieve() calls.
The problem is easily reproducible. Just make sure the nfsauth cache is clean by either unshare and share a dataset, or simply restart the nfs/server SMF service. Then initiate some NFS traffic from one client. You will see this on the server:
# dtrace -n 'nfsauth_retrieve:entry{}' dtrace: description 'nfsauth_retrieve:entry' matched 1 probe CPU ID FUNCTION:NAME 0 62384 nfsauth_retrieve:entry 0 62384 nfsauth_retrieve:entry
The root cause is here in nfsauth_cache_get() - there are missing curly braces:
1018 /* 1019 * If we failed to preallocate the memory for 1020 * supplemental groups, we won't cache the retrieved 1021 * data. 1022 */ 1023 if (p->auth_clnt_ngids != 0 && 1024 p->auth_clnt_gids == NULL) 1025 p->auth_clnt_ngids = 0; 1026 mutex_exit(&p->auth_lock); 1027 1028 p = NULL; 1029 1030 goto retrieve;
Fortunately, this issue is mostly harmless. It have only small performance impact.
Related issues
Actions