Lines Matching defs:rdc

3722 	rddir_cache *rdc;
3799 rdc = avl_find(&rp->r_dir, &srdc, &where);
3800 if (rdc != NULL) {
3801 rddir_cache_hold(rdc);
3811 if (rdc->flags & RDDIR) {
3813 rdc->flags |= RDDIRWAIT;
3817 if (!cv_wait_sig(&rdc->cv, &rp->r_statelock)) {
3827 rddir_cache_rele(rdc);
3835 rddir_cache_rele(rdc);
3844 if (rdc->flags & RDDIRREQ) {
3845 rdc->flags &= ~RDDIRREQ;
3846 rdc->flags |= RDDIR;
3849 nrdc = rdc;
3861 if (rdc->error) {
3862 error = rdc->error;
3864 rddir_cache_rele(rdc);
3875 error = uiomove(rdc->entries, rdc->entlen, UIO_READ, uiop);
3884 uiop->uio_loffset = rdc->nfs3_ncookie;
3886 *eofp = rdc->eof;
3901 if (rdc->eof) {
3902 rp->r_direof = rdc;
3911 rddir_cache_rele(rdc);
3926 srdc.nfs3_cookie = rdc->nfs3_ncookie;
3939 rrdc->nfs3_cookie = rdc->nfs3_ncookie;
3944 rddir_cache_rele(rdc);
3954 rddir_cache_rele(rdc);
4014 do_nfs3readdir(vnode_t *vp, rddir_cache *rdc, cred_t *cr)
4041 nfs3readdirplus(vp, rdc, cr);
4042 if (rdc->error == EOPNOTSUPP)
4043 nfs3readdir(vp, rdc, cr);
4045 nfs3readdir(vp, rdc, cr);
4048 rdc->flags &= ~RDDIR;
4049 if (rdc->flags & RDDIRWAIT) {
4050 rdc->flags &= ~RDDIRWAIT;
4051 cv_broadcast(&rdc->cv);
4053 error = rdc->error;
4055 rdc->flags |= RDDIRREQ;
4058 rddir_cache_rele(rdc);
4064 nfs3readdir(vnode_t *vp, rddir_cache *rdc, cred_t *cr)
4081 args.cookie = (cookie3)rdc->nfs3_cookie;
4083 args.count = rdc->buflen;
4099 rdc->entries = rddir_cache_buf_alloc(rdc->buflen, KM_SLEEP);
4101 rdc->entries = kmem_alloc(rdc->buflen, KM_SLEEP);
4104 res.entries = (dirent64_t *)rdc->entries;
4105 res.entries_size = rdc->buflen;
4108 res.loff = rdc->nfs3_cookie;
4149 rdc->nfs3_ncookie = res.loff;
4151 rdc->eof = res.eof ? 1 : 0;
4152 rdc->entlen = res.size;
4153 ASSERT(rdc->entlen <= rdc->buflen);
4154 rdc->error = 0;
4158 kmem_free(rdc->entries, rdc->buflen);
4159 rdc->entries = NULL;
4160 rdc->error = error;
4174 nfs3readdirplus(vnode_t *vp, rddir_cache *rdc, cred_t *cr)
4190 args.cookie = (cookie3)rdc->nfs3_cookie;
4192 args.dircount = rdc->buflen;
4209 rdc->entries = rddir_cache_buf_alloc(rdc->buflen, KM_SLEEP);
4211 rdc->entries = kmem_alloc(rdc->buflen, KM_SLEEP);
4214 res.entries = (dirent64_t *)rdc->entries;
4215 res.entries_size = rdc->buflen;
4218 res.loff = rdc->nfs3_cookie;
4266 rdc->nfs3_ncookie = res.loff;
4268 rdc->eof = res.eof ? 1 : 0;
4269 rdc->entlen = res.size;
4270 ASSERT(rdc->entlen <= rdc->buflen);
4271 rdc->error = 0;
4276 kmem_free(rdc->entries, rdc->buflen);
4277 rdc->entries = NULL;
4278 rdc->error = error;