* pages, so it is enough to check only one
*/
compressed = clpage->cp_comp_type != LL_COMPR_TYPE_NONE;
+
+ if (resend)
+ compressed = false;
}
if (OBD_FAIL_CHECK(OBD_FAIL_OSC_BRW_PREP_REQ))
RETURN(-ENOMEM); /* Recoverable */
struct ptlrpc_request *new_req;
struct osc_brw_async_args *new_aa;
struct osc_async_page *oap;
+ struct brw_page ***ppga;
+ u32 *page_count;
+
ENTRY;
/* The below message is checked in replay-ost-single.sh test_8ae*/
DEBUG_REQ(rc == -EINPROGRESS ? D_RPCTRACE : D_ERROR, request,
"redo for recoverable error %d", rc);
+ /* if the request was compressed previously, we have to redo with the
+ * original arrays (ideally we'd reuse the compressed ones)
+ */
+ if (aa->aa_ncppga) {
+ ppga = &aa->aa_ncppga;
+ page_count = &aa->aa_ncpage_count;
+ } else {
+ ppga = &aa->aa_ppga;
+ page_count = &aa->aa_page_count;
+ }
+
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);
+ OST_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ,
+ aa->aa_cli, aa->aa_oa, page_count, ppga,
+ &new_req, 1);
if (rc)
RETURN(rc);