X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftarget%2Fout_handler.c;h=6f5dd686351e777e6884e0ec9f7cf98fb7bae892;hp=b18937e44c3fd0ffd2b38ed8d88b5ba28a054686;hb=86fda8611930a6f9ed73cc5e7813c4809a96ab6d;hpb=27659339a94d5eb1789e08c796c953f6effebc11 diff --git a/lustre/target/out_handler.c b/lustre/target/out_handler.c index b18937e..6f5dd68 100644 --- a/lustre/target/out_handler.c +++ b/lustre/target/out_handler.c @@ -1004,17 +1004,23 @@ int out_handle(struct tgt_session_info *tsi) update_bufs[0] = ouh->ouh_inline_data; } else { struct out_update_buffer *tmp; + int page_count = 0; oub = req_capsule_client_get(pill, &RMF_OUT_UPDATE_BUF); if (oub == NULL) GOTO(out_free, rc = err_serious(-EPROTO)); - desc = ptlrpc_prep_bulk_exp(pill->rc_req, update_buf_count, + for (i = 0; i < update_buf_count; i++) + /* First *and* last might be partial pages, hence +1 */ + page_count += DIV_ROUND_UP(oub[i].oub_size, + PAGE_SIZE) + 1; + + desc = ptlrpc_prep_bulk_exp(pill->rc_req, page_count, PTLRPC_BULK_OPS_COUNT, PTLRPC_BULK_GET_SINK | - PTLRPC_BULK_BUF_KVEC, + PTLRPC_BULK_BUF_KIOV, MDS_BULK_PORTAL, - &ptlrpc_bulk_kvec_ops); + &ptlrpc_bulk_kiov_nopin_ops); if (desc == NULL) GOTO(out_free, rc = err_serious(-ENOMEM));