From: James Simmons <jsimmons@infradead.org>
To: Al Viro <viro@ZenIV.linux.org.uk>,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
<linux-fsdevel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
James Simmons <jsimmons@infradead.org>
Subject: [PATCH] staging: lustre: o2iblnd: iov fixes for kiblnd_send
Date: Mon, 11 Jul 2016 13:18:21 -0400 [thread overview]
Message-ID: <1468257501-20630-1-git-send-email-jsimmons@infradead.org> (raw)
With the move to iov_iter handling two issues merged
for the ko2iblnd driver. The first fix address a simple
typo of the wrong flag being used with iov_iter_kvec.
The second fix adds the payload offset to the payload
size.
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index 3d597dc..437e149 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -1519,12 +1519,15 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg)
/* payload is either all vaddrs or all pages */
LASSERT(!(payload_kiov && payload_iov));
- if (payload_kiov)
+ if (payload_kiov) {
iov_iter_bvec(&from, ITER_BVEC | WRITE,
- payload_kiov, payload_niov, payload_nob);
- else
- iov_iter_kvec(&from, ITER_BVEC | WRITE,
- payload_iov, payload_niov, payload_nob);
+ payload_kiov, payload_niov,
+ payload_nob + payload_offset);
+ } else {
+ iov_iter_kvec(&from, ITER_KVEC | WRITE,
+ payload_iov, payload_niov,
+ payload_nob + payload_offset);
+ }
iov_iter_advance(&from, payload_offset);
switch (type) {
--
2.7.4
next reply other threads:[~2016-07-11 17:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 17:18 James Simmons [this message]
2016-07-15 5:01 ` [PATCH] staging: lustre: o2iblnd: iov fixes for kiblnd_send Oleg Drokin
2016-07-15 5:14 ` Al Viro
2016-07-18 15:23 ` James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468257501-20630-1-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=andreas.dilger@intel.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).