IB/core: Enhance ib_map_mr_sg()
The SRP initiator allows to set max_sectors to a value that exceeds the largest amount of data that can be mapped at once with an mlx4 HCA using fast registration and a page size of 4 KB. Hence modify ib_map_mr_sg() such that it can map partial sg-elements. If an sg-element has been mapped partially, let the caller know which fraction has been mapped by adjusting *sg_offset. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com>
此提交包含在:
@@ -1329,7 +1329,7 @@ static int srp_map_finish_fr(struct srp_map_state *state,
|
||||
rkey = ib_inc_rkey(desc->mr->rkey);
|
||||
ib_update_fast_reg_key(desc->mr, rkey);
|
||||
|
||||
n = ib_map_mr_sg(desc->mr, state->sg, sg_nents, 0, dev->mr_page_size);
|
||||
n = ib_map_mr_sg(desc->mr, state->sg, sg_nents, NULL, dev->mr_page_size);
|
||||
if (unlikely(n < 0)) {
|
||||
srp_fr_pool_put(ch->fr_pool, &desc, 1);
|
||||
pr_debug("%s: ib_map_mr_sg(%d) returned %d.\n",
|
||||
|
新增問題並參考
封鎖使用者