Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-13004 target: use KIOV for out_handle
[fs/lustre-release.git]
/
lustre
/
target
/
out_handler.c
diff --git
a/lustre/target/out_handler.c
b/lustre/target/out_handler.c
index
b18937e
..
6f5dd68
100644
(file)
--- 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;
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));
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_OPS_COUNT,
PTLRPC_BULK_GET_SINK |
- PTLRPC_BULK_BUF_K
VEC
,
+ PTLRPC_BULK_BUF_K
IOV
,
MDS_BULK_PORTAL,
MDS_BULK_PORTAL,
- &ptlrpc_bulk_k
vec
_ops);
+ &ptlrpc_bulk_k
iov_nopin
_ops);
if (desc == NULL)
GOTO(out_free, rc = err_serious(-ENOMEM));
if (desc == NULL)
GOTO(out_free, rc = err_serious(-ENOMEM));