• Home
  • Raw
  • Download

Lines Matching refs:req

59 				 struct fuse_req *req, bool in_flight);
248 void *req; in virtio_fs_hiprio_done_work() local
252 while ((req = virtqueue_get_buf(vq, &len)) != NULL) { in virtio_fs_hiprio_done_work()
253 kfree(req); in virtio_fs_hiprio_done_work()
262 struct fuse_req *req; in virtio_fs_request_dispatch_work() local
271 req = list_first_entry_or_null(&fsvq->end_reqs, struct fuse_req, in virtio_fs_request_dispatch_work()
273 if (!req) { in virtio_fs_request_dispatch_work()
278 list_del_init(&req->list); in virtio_fs_request_dispatch_work()
280 fuse_request_end(fc, req); in virtio_fs_request_dispatch_work()
286 req = list_first_entry_or_null(&fsvq->queued_reqs, in virtio_fs_request_dispatch_work()
288 if (!req) { in virtio_fs_request_dispatch_work()
292 list_del_init(&req->list); in virtio_fs_request_dispatch_work()
295 ret = virtio_fs_enqueue_req(fsvq, req, true); in virtio_fs_request_dispatch_work()
299 list_add_tail(&req->list, &fsvq->queued_reqs); in virtio_fs_request_dispatch_work()
305 req->out.h.error = ret; in virtio_fs_request_dispatch_work()
311 fuse_request_end(fc, req); in virtio_fs_request_dispatch_work()
379 static int copy_args_to_argbuf(struct fuse_req *req) in copy_args_to_argbuf() argument
381 struct fuse_args *args = req->args; in copy_args_to_argbuf()
393 req->argbuf = kmalloc(len, GFP_ATOMIC); in copy_args_to_argbuf()
394 if (!req->argbuf) in copy_args_to_argbuf()
398 memcpy(req->argbuf + offset, in copy_args_to_argbuf()
408 static void copy_args_from_argbuf(struct fuse_args *args, struct fuse_req *req) in copy_args_from_argbuf() argument
416 remaining = req->out.h.len - sizeof(req->out.h); in copy_args_from_argbuf()
430 memcpy(args->out_args[i].value, req->argbuf + offset, argsize); in copy_args_from_argbuf()
441 kfree(req->argbuf); in copy_args_from_argbuf()
442 req->argbuf = NULL; in copy_args_from_argbuf()
453 struct fuse_req *req; in virtio_fs_requests_done_work() local
466 while ((req = virtqueue_get_buf(vq, &len)) != NULL) { in virtio_fs_requests_done_work()
468 list_move_tail(&req->list, &reqs); in virtio_fs_requests_done_work()
475 list_for_each_entry_safe(req, next, &reqs, list) { in virtio_fs_requests_done_work()
480 args = req->args; in virtio_fs_requests_done_work()
481 copy_args_from_argbuf(args, req); in virtio_fs_requests_done_work()
500 clear_bit(FR_SENT, &req->flags); in virtio_fs_requests_done_work()
501 list_del_init(&req->list); in virtio_fs_requests_done_work()
504 fuse_request_end(fc, req); in virtio_fs_requests_done_work()
799 static unsigned int sg_count_fuse_req(struct fuse_req *req) in sg_count_fuse_req() argument
801 struct fuse_args *args = req->args; in sg_count_fuse_req()
811 if (!test_bit(FR_ISREPLY, &req->flags)) in sg_count_fuse_req()
847 struct fuse_req *req, in sg_init_fuse_args() argument
854 struct fuse_args_pages *ap = container_of(req->args, typeof(*ap), args); in sg_init_fuse_args()
876 struct fuse_req *req, bool in_flight) in virtio_fs_enqueue_req() argument
884 struct fuse_args *args = req->args; in virtio_fs_enqueue_req()
895 total_sgs = sg_count_fuse_req(req); in virtio_fs_enqueue_req()
906 ret = copy_args_to_argbuf(req); in virtio_fs_enqueue_req()
911 sg_init_one(&sg[out_sgs++], &req->in.h, sizeof(req->in.h)); in virtio_fs_enqueue_req()
912 out_sgs += sg_init_fuse_args(&sg[out_sgs], req, in virtio_fs_enqueue_req()
915 req->argbuf, &argbuf_used); in virtio_fs_enqueue_req()
918 if (test_bit(FR_ISREPLY, &req->flags)) { in virtio_fs_enqueue_req()
920 &req->out.h, sizeof(req->out.h)); in virtio_fs_enqueue_req()
921 in_sgs += sg_init_fuse_args(&sg[out_sgs + in_sgs], req, in virtio_fs_enqueue_req()
924 req->argbuf + argbuf_used, NULL); in virtio_fs_enqueue_req()
941 ret = virtqueue_add_sgs(vq, sgs, out_sgs, in_sgs, req, GFP_ATOMIC); in virtio_fs_enqueue_req()
950 list_add_tail(&req->list, fpq->processing); in virtio_fs_enqueue_req()
952 set_bit(FR_SENT, &req->flags); in virtio_fs_enqueue_req()
966 if (ret < 0 && req->argbuf) { in virtio_fs_enqueue_req()
967 kfree(req->argbuf); in virtio_fs_enqueue_req()
968 req->argbuf = NULL; in virtio_fs_enqueue_req()
983 struct fuse_req *req; in virtio_fs_wake_pending_and_unlock() local
988 req = list_last_entry(&fiq->pending, struct fuse_req, list); in virtio_fs_wake_pending_and_unlock()
989 clear_bit(FR_PENDING, &req->flags); in virtio_fs_wake_pending_and_unlock()
990 list_del_init(&req->list); in virtio_fs_wake_pending_and_unlock()
997 __func__, req->in.h.opcode, req->in.h.unique, in virtio_fs_wake_pending_and_unlock()
998 req->in.h.nodeid, req->in.h.len, in virtio_fs_wake_pending_and_unlock()
999 fuse_len_args(req->args->out_numargs, req->args->out_args)); in virtio_fs_wake_pending_and_unlock()
1002 ret = virtio_fs_enqueue_req(fsvq, req, false); in virtio_fs_wake_pending_and_unlock()
1010 list_add_tail(&req->list, &fsvq->queued_reqs); in virtio_fs_wake_pending_and_unlock()
1017 req->out.h.error = ret; in virtio_fs_wake_pending_and_unlock()
1022 list_add_tail(&req->list, &fsvq->end_reqs); in virtio_fs_wake_pending_and_unlock()