usr/src/uts/common/fs/nfs/nfs_cmd.c:

 197  * First try to find a cached entry. If not successfull,


One 'l' as successful

----

 224         if (charset == NULL)
 225                 /* the slooow way - ask daemon */
 226                 charset = nfscmd_charmap(exi, sp);

I'd prefer 225 before 224.

-----

 276         ASSERT(exi != NULL);
 277         ASSERT(sp != NULL);

Handles debug. For production, why not add the following as well:

if (exi == NULL || sp == NULL)
    return (NULL);

Actually, this is a major requirement. nfscmd_charmap() used to
handle this without a potential panic. Now it will panic.


---


usr/src/uts/common/fs/nfs/nfs4_srv.c




6067 static nfsstat4
6068 rfs4_lookup(component4 *component, struct svc_req *req,
6069     struct compound_state *cs)

6097         /* If necessary, convert to UTF-8 for illbehaved clients */
6098 
6099         ca = (struct sockaddr *)svc_getrpccaller(req->rq_xprt)->buf;
6100         name = nfscmd_convname(ca, cs->exi, nm, NFSCMD_CONV_INBOUND,
6101             MAXPATHLEN + 1);
6102 
6103         if (name == NULL) {

So now every lookup will make a call to userland regardless.

What is the performance impact?

Is there a quick check that can be done here to see if we need to make
the call?

Is there a way to cache results or the fact that a cs->exi is known
to be well behaved?

---

BTW: it should be "ill behaved" on 6097

Reply via email to