Lines Matching full:od

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