Lines Matching refs:rdir
89 if (!fid->rdir) in v9fs_alloc_rdir_buf()
90 fid->rdir = kzalloc(sizeof(struct p9_rdir) + buflen, GFP_KERNEL); in v9fs_alloc_rdir_buf()
91 return fid->rdir; in v9fs_alloc_rdir_buf()
108 struct p9_rdir *rdir; in v9fs_dir_readdir() local
116 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir()
117 if (!rdir) in v9fs_dir_readdir()
119 kvec.iov_base = rdir->buf; in v9fs_dir_readdir()
123 if (rdir->tail == rdir->head) { in v9fs_dir_readdir()
134 rdir->head = 0; in v9fs_dir_readdir()
135 rdir->tail = n; in v9fs_dir_readdir()
137 while (rdir->head < rdir->tail) { in v9fs_dir_readdir()
138 err = p9stat_read(fid->clnt, rdir->buf + rdir->head, in v9fs_dir_readdir()
139 rdir->tail - rdir->head, &st); in v9fs_dir_readdir()
151 rdir->head += err; in v9fs_dir_readdir()
168 struct p9_rdir *rdir; in v9fs_dir_readdir_dotl() local
176 rdir = v9fs_alloc_rdir_buf(file, buflen); in v9fs_dir_readdir_dotl()
177 if (!rdir) in v9fs_dir_readdir_dotl()
181 if (rdir->tail == rdir->head) { in v9fs_dir_readdir_dotl()
182 err = p9_client_readdir(fid, rdir->buf, buflen, in v9fs_dir_readdir_dotl()
187 rdir->head = 0; in v9fs_dir_readdir_dotl()
188 rdir->tail = err; in v9fs_dir_readdir_dotl()
191 while (rdir->head < rdir->tail) { in v9fs_dir_readdir_dotl()
193 err = p9dirent_read(fid->clnt, rdir->buf + rdir->head, in v9fs_dir_readdir_dotl()
194 rdir->tail - rdir->head, in v9fs_dir_readdir_dotl()
208 rdir->head += err; in v9fs_dir_readdir_dotl()