From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751609AbcGRPX4 (ORCPT ); Mon, 18 Jul 2016 11:23:56 -0400 Received: from casper.infradead.org ([85.118.1.10]:41954 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbcGRPXy (ORCPT ); Mon, 18 Jul 2016 11:23:54 -0400 Date: Mon, 18 Jul 2016 16:23:44 +0100 (BST) From: James Simmons To: Oleg Drokin cc: Al Viro , Andreas Dilger , Linux Kernel Mailing List , linux-fsdevel@vger.kernel.org, Lustre Development List Subject: Re: [PATCH] staging: lustre: o2iblnd: iov fixes for kiblnd_send In-Reply-To: <72A3B3D7-69A3-40D4-8B89-103EB342E894@intel.com> Message-ID: References: <1468257501-20630-1-git-send-email-jsimmons@infradead.org> <72A3B3D7-69A3-40D4-8B89-103EB342E894@intel.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160718_162345_029617_004B2753 X-CRM114-Status: GOOD ( 25.09 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jul 11, 2016, at 1:18 PM, James Simmons wrote: > > > 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) { > > The braces are in fact going to make checkpatch complain that we do not > need them here. > > > 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); > > Why are we adding the offset to number of bytes here? > > > + } else { > > + iov_iter_kvec(&from, ITER_KVEC | WRITE, > > + payload_iov, payload_niov, > > + payload_nob + payload_offset); > > + } > > iov_iter_advance(&from, payload_offset); > > Ah, I guess we added it there to then subtract here? > > Do you mind if I just merge this change into Al's patch with you as another > Signed-off-by line instead? Sure, I'm fine with that. All I care is that this is merged. > Since we caught this early, probably no point in having a breakage point in > the history as it might break a future bisect. > > > > switch (type) { > > -- > > 2.7.4 > >