X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosc%2Fosc_request.c;h=92575cc3cb4d99bd479177c81b937773fcfc5e9d;hb=6263c68f6591b41b09ff680a6a32e3098fabd6da;hp=86b9bcb4f05fceda9e6a13cbd8f5f27a56377225;hpb=3688ffa4921765d17ba922b4bd415cb279fc62d4;p=fs%2Flustre-release.git diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 86b9bcb..92575cc 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1490,13 +1490,19 @@ static int osc_send_oap_rpc(struct client_obd *cli, struct lov_oinfo *loi, if (pos == NULL) break; + /* If there is a gap at the start of this page, it can't merge + * with any previous page, so we'll hand the network a + * "fragmented" page array that it can't transfer in 1 RDMA */ + if (page_count != 0 && oap->oap_page_off != 0) + break; + /* take the page out of our book-keeping */ list_del_init(&oap->oap_pending_item); lop_update_pending(cli, lop, cmd, -1); list_del_init(&oap->oap_urgent_item); if (page_count == 0) - starting_offset = (oap->oap_obj_off +oap->oap_page_off)& + starting_offset = (oap->oap_obj_off + oap->oap_page_off) & (PTLRPC_MAX_BRW_SIZE - 1); /* ask the caller for the size of the io as the rpc leaves. */ @@ -1523,6 +1529,12 @@ static int osc_send_oap_rpc(struct client_obd *cli, struct lov_oinfo *loi, oap->oap_count) & (PTLRPC_MAX_BRW_SIZE - 1); if (ending_offset == 0) break; + + /* If there is a gap at the end of this page, it can't merge + * with any subsequent pages, so we'll hand the network a + * "fragmented" page array that it can't transfer in 1 RDMA */ + if (oap->oap_page_off + oap->oap_count < PAGE_SIZE) + break; } osc_wake_cache_waiters(cli);