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
Updated by Marcel Telka almost 7 years ago
- Status changed from In Progress to Pending RTI
Updated by Marcel Telka almost 7 years ago
- Related to Bug #5509: nfsauth_cache_get() could spend a lot of time walking exi_cache added
Updated by Electric Monk almost 7 years ago
- Status changed from Pending RTI to Closed
- % Done changed from 0 to 100
git commit 09818e88dd7907e7eccd0caf8973ebfa6806b5f1
commit 09818e88dd7907e7eccd0caf8973ebfa6806b5f1 Author: Marcel Telka <marcel.telka@nexenta.com> Date: 2015-09-22T13:49:38.000Z 6257 First nfsauth_retrieve() is never cached in nfsauth_cache_get() Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Arne Jansen <sensille@gmx.net> Approved by: Dan McDonald <danmcd@omniti.com>
Actions