Lines Matching defs:od

61 static int do_readdir(struct orangefs_dir *od, struct inode *inode,
76 op->upcall.req.readdir.token = od->token;
83 od->error = bufi;
100 od->error = r;
107 od->error = r;
111 od->error = op->downcall.status;
121 od->error = -EIO;
127 od->token = resp->token;
131 static int parse_readdir(struct orangefs_dir *od,
138 part = od->part;
151 if (!od->part)
152 od->part = new;
156 od->end = count << PART_SHIFT;
161 static int orangefs_dir_more(struct orangefs_dir *od, struct inode *inode)
168 od->error = -ENOMEM;
171 r = do_readdir(od, inode, op);
173 od->error = r;
176 r = parse_readdir(od, op);
178 od->error = r;
182 od->error = 0;
185 return od->error;
240 static int orangefs_dir_fill(struct orangefs_dir *od, struct dir_context *ctx)
247 part = od->part;
254 od->error = -EIO;
262 od->error = r;
282 struct orangefs_dir *od = file->private_data;
287 if (!whence && offset < od->end) {
288 struct orangefs_dir_part *part = od->part;
294 od->token = ORANGEFS_ITERATE_START;
295 od->part = NULL;
296 od->end = 1 << PART_SHIFT;
304 struct orangefs_dir *od = file->private_data;
308 if (od->error)
309 return od->error;
335 while (od->token != ORANGEFS_ITERATE_END &&
336 ctx->pos > od->end) {
337 r = orangefs_dir_more(od, inode);
341 if (od->token == ORANGEFS_ITERATE_END && ctx->pos > od->end)
345 if (ctx->pos < od->end) {
346 r = orangefs_dir_fill(od, ctx);
352 if (od->token != ORANGEFS_ITERATE_END) {
353 r = orangefs_dir_more(od, inode);
356 r = orangefs_dir_fill(od, ctx);
364 struct orangefs_dir *od;
369 od = file->private_data;
370 od->token = ORANGEFS_ITERATE_START;
371 od->part = NULL;
372 od->end = 1 << PART_SHIFT;
373 od->error = 0;
379 struct orangefs_dir *od = file->private_data;
380 struct orangefs_dir_part *part = od->part;
386 kfree(od);