• Home
  • Raw
  • Download

Lines Matching refs:req

185 	struct ceph_mds_request *req;  in prepare_open_request()  local
192 req = ceph_mdsc_create_request(mdsc, op, want_auth); in prepare_open_request()
193 if (IS_ERR(req)) in prepare_open_request()
195 req->r_fmode = ceph_flags_to_mode(flags); in prepare_open_request()
196 req->r_args.open.flags = ceph_flags_sys2wire(flags); in prepare_open_request()
197 req->r_args.open.mode = cpu_to_le32(create_mode); in prepare_open_request()
199 return req; in prepare_open_request()
292 struct ceph_mds_request *req; in ceph_renew_caps() local
320 req = prepare_open_request(inode->i_sb, flags, 0); in ceph_renew_caps()
321 if (IS_ERR(req)) { in ceph_renew_caps()
322 err = PTR_ERR(req); in ceph_renew_caps()
326 req->r_inode = inode; in ceph_renew_caps()
328 req->r_num_caps = 1; in ceph_renew_caps()
329 req->r_fmode = -1; in ceph_renew_caps()
331 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_renew_caps()
332 ceph_mdsc_put_request(req); in ceph_renew_caps()
349 struct ceph_mds_request *req; in ceph_open() local
415 req = prepare_open_request(inode->i_sb, flags, 0); in ceph_open()
416 if (IS_ERR(req)) { in ceph_open()
417 err = PTR_ERR(req); in ceph_open()
420 req->r_inode = inode; in ceph_open()
423 req->r_num_caps = 1; in ceph_open()
424 err = ceph_mdsc_do_request(mdsc, NULL, req); in ceph_open()
426 err = ceph_init_file(inode, file, req->r_fmode); in ceph_open()
427 ceph_mdsc_put_request(req); in ceph_open()
443 struct ceph_mds_request *req; in ceph_atomic_open() local
471 req = prepare_open_request(dir->i_sb, flags, mode); in ceph_atomic_open()
472 if (IS_ERR(req)) { in ceph_atomic_open()
473 err = PTR_ERR(req); in ceph_atomic_open()
476 req->r_dentry = dget(dentry); in ceph_atomic_open()
477 req->r_num_caps = 2; in ceph_atomic_open()
479 req->r_dentry_drop = CEPH_CAP_FILE_SHARED | CEPH_CAP_AUTH_EXCL; in ceph_atomic_open()
480 req->r_dentry_unless = CEPH_CAP_FILE_EXCL; in ceph_atomic_open()
482 req->r_pagelist = as_ctx.pagelist; in ceph_atomic_open()
490 req->r_args.open.mask = cpu_to_le32(mask); in ceph_atomic_open()
492 req->r_parent = dir; in ceph_atomic_open()
493 set_bit(CEPH_MDS_R_PARENT_LOCKED, &req->r_req_flags); in ceph_atomic_open()
496 req); in ceph_atomic_open()
497 err = ceph_handle_snapdir(req, dentry, err); in ceph_atomic_open()
501 if ((flags & O_CREAT) && !req->r_reply_info.head->is_dentry) in ceph_atomic_open()
505 dn = ceph_finish_lookup(req, dentry, err); in ceph_atomic_open()
520 if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) { in ceph_atomic_open()
527 if (!req->r_err && req->r_target_inode) in ceph_atomic_open()
528 ceph_put_fmode(ceph_inode(req->r_target_inode), req->r_fmode); in ceph_atomic_open()
529 ceph_mdsc_put_request(req); in ceph_atomic_open()
612 struct ceph_osd_request *req; in ceph_sync_read() local
619 req = ceph_osdc_new_request(osdc, &ci->i_layout, in ceph_sync_read()
624 if (IS_ERR(req)) { in ceph_sync_read()
625 ret = PTR_ERR(req); in ceph_sync_read()
635 ceph_osdc_put_request(req); in ceph_sync_read()
642 osd_req_op_extent_update(req, 0, len); in ceph_sync_read()
650 ceph_osdc_put_request(req); in ceph_sync_read()
656 osd_req_op_extent_osd_data_pages(req, 0, pages, len, page_off, in ceph_sync_read()
658 ret = ceph_osdc_start_request(osdc, req, false); in ceph_sync_read()
660 ret = ceph_osdc_wait_request(osdc, req); in ceph_sync_read()
661 ceph_osdc_put_request(req); in ceph_sync_read()
742 struct ceph_osd_request *req; member
793 static void ceph_aio_complete_req(struct ceph_osd_request *req) in ceph_aio_complete_req() argument
795 int rc = req->r_result; in ceph_aio_complete_req()
796 struct inode *inode = req->r_inode; in ceph_aio_complete_req()
797 struct ceph_aio_request *aio_req = req->r_priv; in ceph_aio_complete_req()
798 struct ceph_osd_data *osd_data = osd_req_op_extent_osd_data(req, 0); in ceph_aio_complete_req()
813 aio_work->req = req; in ceph_aio_complete_req()
850 ceph_osdc_put_request(req); in ceph_aio_complete_req()
863 struct ceph_osd_request *orig_req = aio_work->req; in ceph_aio_retry_work()
868 struct ceph_osd_request *req; in ceph_aio_retry_work() local
884 req = ceph_osdc_alloc_request(orig_req->r_osdc, snapc, 1, in ceph_aio_retry_work()
886 if (!req) { in ceph_aio_retry_work()
888 req = orig_req; in ceph_aio_retry_work()
892 req->r_flags = /* CEPH_OSD_FLAG_ORDERSNAP | */ CEPH_OSD_FLAG_WRITE; in ceph_aio_retry_work()
893 ceph_oloc_copy(&req->r_base_oloc, &orig_req->r_base_oloc); in ceph_aio_retry_work()
894 ceph_oid_copy(&req->r_base_oid, &orig_req->r_base_oid); in ceph_aio_retry_work()
896 req->r_ops[0] = orig_req->r_ops[0]; in ceph_aio_retry_work()
898 req->r_mtime = aio_req->mtime; in ceph_aio_retry_work()
899 req->r_data_offset = req->r_ops[0].extent.offset; in ceph_aio_retry_work()
901 ret = ceph_osdc_alloc_messages(req, GFP_NOFS); in ceph_aio_retry_work()
903 ceph_osdc_put_request(req); in ceph_aio_retry_work()
904 req = orig_req; in ceph_aio_retry_work()
910 req->r_callback = ceph_aio_complete_req; in ceph_aio_retry_work()
911 req->r_inode = inode; in ceph_aio_retry_work()
912 req->r_priv = aio_req; in ceph_aio_retry_work()
914 ret = ceph_osdc_start_request(req->r_osdc, req, false); in ceph_aio_retry_work()
917 req->r_result = ret; in ceph_aio_retry_work()
918 ceph_aio_complete_req(req); in ceph_aio_retry_work()
935 struct ceph_osd_request *req; in ceph_direct_read_write() local
976 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_direct_read_write()
985 if (IS_ERR(req)) { in ceph_direct_read_write()
986 ret = PTR_ERR(req); in ceph_direct_read_write()
992 ceph_osdc_put_request(req); in ceph_direct_read_write()
997 osd_req_op_extent_update(req, 0, len); in ceph_direct_read_write()
1027 req->r_mtime = mtime; in ceph_direct_read_write()
1030 osd_req_op_extent_osd_data_bvecs(req, 0, bvecs, num_pages, len); in ceph_direct_read_write()
1037 req->r_callback = ceph_aio_complete_req; in ceph_direct_read_write()
1038 req->r_inode = inode; in ceph_direct_read_write()
1039 req->r_priv = aio_req; in ceph_direct_read_write()
1040 list_add_tail(&req->r_private_item, &aio_req->osd_reqs); in ceph_direct_read_write()
1046 ret = ceph_osdc_start_request(req->r_osdc, req, false); in ceph_direct_read_write()
1048 ret = ceph_osdc_wait_request(&fsc->client->osdc, req); in ceph_direct_read_write()
1069 ceph_osdc_put_request(req); in ceph_direct_read_write()
1099 req = list_first_entry(&osd_reqs, in ceph_direct_read_write()
1102 list_del_init(&req->r_private_item); in ceph_direct_read_write()
1104 ret = ceph_osdc_start_request(req->r_osdc, in ceph_direct_read_write()
1105 req, false); in ceph_direct_read_write()
1107 req->r_result = ret; in ceph_direct_read_write()
1108 ceph_aio_complete_req(req); in ceph_direct_read_write()
1137 struct ceph_osd_request *req; in ceph_sync_write() local
1172 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_sync_write()
1178 if (IS_ERR(req)) { in ceph_sync_write()
1179 ret = PTR_ERR(req); in ceph_sync_write()
1211 req->r_inode = inode; in ceph_sync_write()
1213 osd_req_op_extent_osd_data_pages(req, 0, pages, len, 0, in ceph_sync_write()
1216 req->r_mtime = mtime; in ceph_sync_write()
1217 ret = ceph_osdc_start_request(&fsc->client->osdc, req, false); in ceph_sync_write()
1219 ret = ceph_osdc_wait_request(&fsc->client->osdc, req); in ceph_sync_write()
1222 ceph_osdc_put_request(req); in ceph_sync_write()
1690 struct ceph_osd_request *req; in ceph_zero_partial_object() local
1702 req = ceph_osdc_new_request(&fsc->client->osdc, &ci->i_layout, in ceph_zero_partial_object()
1708 if (IS_ERR(req)) { in ceph_zero_partial_object()
1709 ret = PTR_ERR(req); in ceph_zero_partial_object()
1713 req->r_mtime = inode->i_mtime; in ceph_zero_partial_object()
1714 ret = ceph_osdc_start_request(&fsc->client->osdc, req, false); in ceph_zero_partial_object()
1716 ret = ceph_osdc_wait_request(&fsc->client->osdc, req); in ceph_zero_partial_object()
1720 ceph_osdc_put_request(req); in ceph_zero_partial_object()