osd_req->r_callback = rbd_osd_req_callback;
osd_req->r_priv = obj_request;
+ osd_req->r_oloc.pool = ceph_file_layout_pg_pool(rbd_dev->layout);
+
osd_req->r_oid_len = strlen(obj_request->object_name);
rbd_assert(osd_req->r_oid_len < sizeof (osd_req->r_oid));
memcpy(osd_req->r_oid, obj_request->object_name, osd_req->r_oid_len);
- osd_req->r_file_layout = rbd_dev->layout; /* struct */
-
return osd_req;
}
osd_req->r_callback = rbd_osd_req_callback;
osd_req->r_priv = obj_request;
+ osd_req->r_oloc.pool = ceph_file_layout_pg_pool(rbd_dev->layout);
+
osd_req->r_oid_len = strlen(obj_request->object_name);
rbd_assert(osd_req->r_oid_len < sizeof (osd_req->r_oid));
memcpy(osd_req->r_oid, obj_request->object_name, osd_req->r_oid_len);
- osd_req->r_file_layout = rbd_dev->layout; /* struct */
-
return osd_req;
}
struct inode *r_inode; /* for use by callbacks */
void *r_priv; /* ditto */
+ struct ceph_object_locator r_oloc;
+
char r_oid[MAX_OBJ_NAME_SIZE]; /* object name */
int r_oid_len;
u64 r_snapid;
unsigned long r_stamp; /* send OR check time */
- struct ceph_file_layout r_file_layout;
struct ceph_snap_context *r_snapc; /* snap context for writes */
};
INIT_LIST_HEAD(&req->r_req_lru_item);
INIT_LIST_HEAD(&req->r_osd_item);
+ req->r_oloc.pool = -1;
+
/* create reply message */
if (use_mempool)
msg = ceph_msgpool_get(&osdc->msgpool_op_reply, 0);
if (num_ops > 1)
osd_req_op_init(req, 1, CEPH_OSD_OP_STARTSYNC);
- req->r_file_layout = *layout; /* keep a copy */
+ req->r_oloc.pool = ceph_file_layout_pg_pool(*layout);
snprintf(req->r_oid, sizeof(req->r_oid), "%llx.%08llx",
vino.ino, objnum);
dout("map_request %p tid %lld\n", req, req->r_tid);
err = ceph_calc_ceph_pg(&pgid, req->r_oid, osdc->osdmap,
- ceph_file_layout_pg_pool(req->r_file_layout));
+ req->r_oloc.pool);
if (err) {
list_move(&req->r_req_lru_item, &osdc->req_notarget);
return err;
/* fill in message content that changes each time we send it */
put_unaligned_le32(osdc->osdmap->epoch, req->r_request_osdmap_epoch);
put_unaligned_le32(req->r_flags, req->r_request_flags);
- put_unaligned_le64(req->r_pgid.pool, req->r_request_pool);
+ put_unaligned_le64(req->r_oloc.pool, req->r_request_pool);
p = req->r_request_pgid;
ceph_encode_64(&p, req->r_pgid.pool);
ceph_encode_32(&p, req->r_pgid.seed);