struct osc_creator *rq_oscc;
struct lov_stripe_md *rq_lsm;
struct obd_info *rq_oinfo;
+ int rq_grow_count;
};
static int oscc_internal_create(struct osc_creator *oscc);
static int osc_interpret_create(const struct lu_env *env,
struct ptlrpc_request *req, void *data, int rc)
{
- struct osc_creator *oscc;
+ struct osc_create_async_args *args = ptlrpc_req_async_args(req);
+ struct osc_creator *oscc = args->rq_oscc;
struct ost_body *body = NULL;
struct ptlrpc_request *fake_req, *pos;
ENTRY;
rc = -EPROTO;
}
- oscc = req->rq_async_args.pointer_arg[0];
LASSERT(oscc && (oscc->oscc_obd != LP_POISON));
cfs_spin_lock(&oscc->oscc_lock);
int diff =ostid_id(&body->oa.o_oi)- oscc->oscc_last_id;
/* oscc_internal_create() stores the original value of
- * grow_count in rq_async_args.space[0].
+ * grow_count in osc_create_async_args::rq_grow_count.
* We can't compare against oscc_grow_count directly,
* because it may have been increased while the RPC
* is in flight, so we would always find ourselves
* having created fewer objects and decreasing the
* precreate request size. b=18577 */
- if (diff < (int) req->rq_async_args.space[0]) {
+ if (diff < args->rq_grow_count) {
/* the OST has not managed to create all the
* objects we asked for */
oscc->oscc_grow_count = max(diff,
static int oscc_internal_create(struct osc_creator *oscc)
{
+ struct osc_create_async_args *args;
struct ptlrpc_request *request;
struct ost_body *body;
ENTRY;
request->rq_request_portal = OST_CREATE_PORTAL;
ptlrpc_at_set_req_timeout(request);
body = req_capsule_client_get(&request->rq_pill, &RMF_OST_BODY);
+ args = ptlrpc_req_async_args(request);
+ args->rq_oscc = oscc;
cfs_spin_lock(&oscc->oscc_lock);
+ args->rq_grow_count = oscc->oscc_grow_count;
if (likely(fid_seq_is_mdt(oscc->oscc_oa.o_seq))) {
body->oa.o_oi.oi_seq = oscc->oscc_oa.o_seq;
CWARN("o_seq: "LPU64" is not indicate any MDTs.\n",
oscc->oscc_oa.o_seq);
}
+ cfs_spin_unlock(&oscc->oscc_lock);
body->oa.o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP;
- request->rq_async_args.space[0] = oscc->oscc_grow_count;
- cfs_spin_unlock(&oscc->oscc_lock);
CDEBUG(D_RPCTRACE, "prealloc through id "LPU64" (last seen "LPU64")\n",
body->oa.o_id, oscc->oscc_last_id);
request->rq_no_delay = request->rq_no_resend = 1;
ptlrpc_request_set_replen(request);
- request->rq_async_args.pointer_arg[0] = oscc;
request->rq_interpret_reply = osc_interpret_create;
ptlrpcd_add_req(request, PSCOPE_OTHER);