From patchwork Mon Jul 11 17:18:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 9223851 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B087B60871 for ; Mon, 11 Jul 2016 17:26:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9739B27DCE for ; Mon, 11 Jul 2016 17:26:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C12B27DF9; Mon, 11 Jul 2016 17:26:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15EFE27DCE for ; Mon, 11 Jul 2016 17:26:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030669AbcGKR0R (ORCPT ); Mon, 11 Jul 2016 13:26:17 -0400 Received: from smtp1.ccs.ornl.gov ([160.91.199.38]:45838 "EHLO smtp1.ccs.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754469AbcGKR0R (ORCPT ); Mon, 11 Jul 2016 13:26:17 -0400 X-Greylist: delayed 463 seconds by postgrey-1.27 at vger.kernel.org; Mon, 11 Jul 2016 13:26:17 EDT Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp1.ccs.ornl.gov (Postfix) with ESMTP id 321BD20088; Mon, 11 Jul 2016 13:18:33 -0400 (EDT) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id 200B9C1B40; Mon, 11 Jul 2016 13:18:33 -0400 (EDT) From: James Simmons To: Al Viro , Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , , Lustre Development List , James Simmons Subject: [PATCH] staging: lustre: o2iblnd: iov fixes for kiblnd_send Date: Mon, 11 Jul 2016 13:18:21 -0400 Message-Id: <1468257501-20630-1-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.7.1 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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) {