On Jan 26, 6:17am, dholland-t...@netbsd.org (David Holland) wrote: -- Subject: Re: cookies and kmem_alloc
| On Mon, Jan 25, 2016 at 02:31:15PM -0500, Christos Zoulas wrote: | > The directory functions pass around ap_cookies, and ap_ncookies, | > but if one uses kmem_alloc() instead of malloc(), there is no way | > to kmem_free() the buffer, since we don't pass the size. I suggest | > that we add a new field called ap_acookies, which holds the size we | > allocated with kmem_alloc(), or it is 0 for compatibility for code | > that allocated the cookie buffer with malloc(). Any better ideas? | | Burn down the in-kernel readdir interface and do a new one; it is | terrible the way it is and there's nothing to be gained by attempting | to polish it. It is complicated to do that. And we'll need to retain compatibility at the system call level which makes this harder. | I don't yet have a clear handle on what the interface should be; but | both the nfs-facing and userlevel-facing parts are no good as is. :( Until we do, I suggest that we make its use easier. christos