static int
osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa,
u32 page_count, struct brw_page **pga,
- struct ptlrpc_request **reqp, int resend)
+ struct ptlrpc_request **reqp, struct cl_object *clobj,
+ int resend)
{
struct ptlrpc_request *req;
struct ptlrpc_bulk_desc *desc;
if (pa)
OBD_FREE_PTR_ARRAY_LARGE(pa, page_count);
} else if (opc == OST_WRITE && inode && IS_ENCRYPTED(inode)) {
- struct osc_async_page *oap = brw_page2oap(pga[0]);
- struct cl_page *clpage = oap2cl_page(oap);
- struct cl_object *clobj = clpage->cp_obj;
struct cl_attr attr = { 0 };
struct lu_env *env;
__u16 refcheck;
aa->aa_resends = 0;
aa->aa_ppga = pga;
aa->aa_cli = cli;
+ aa->aa_obj = clobj;
INIT_LIST_HEAD(&aa->aa_oaps);
*reqp = req;
rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) ==
OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ,
aa->aa_cli, aa->aa_oa, aa->aa_page_count,
- aa->aa_ppga, &new_req, 1);
+ aa->aa_ppga, &new_req, aa->aa_obj, 1);
if (rc)
RETURN(rc);
}
sort_brw_pages(pga, page_count);
- rc = osc_brw_prep_request(cmd, cli, oa, page_count, pga, &req, 0);
+ rc = osc_brw_prep_request(cmd, cli, oa, page_count, pga, &req,
+ cl_object_top(osc2cl(obj)), 0);
if (rc != 0) {
CERROR("prep_req failed: %d\n", rc);
GOTO(out, rc);
oa.o_flags = OBD_FL_NORPC;
rc = osc_brw_prep_request(OBD_BRW_READ, osc_cli(osc), &oa, 1, &pga,
- &req, 0);
+ &req, cl_object_top(osc2cl(osc)), 0);
/* If we succeeded we ship it off, if not there's no point in doing
* anything. Also no resends.