X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fklnds%2Fgnilnd%2Fgnilnd_cb.c;fp=lnet%2Fklnds%2Fgnilnd%2Fgnilnd_cb.c;h=fbcec237cf52dc422cab6391a0ebc366a4c8a599;hb=0703fa84c0f2dc69025a0849ba13f0d0d1a97738;hp=6be0b2a74bb7acac17eab719a058ea768e78c100;hpb=597665de6ee4e77b259a82f126d95cb2d60bb260;p=fs%2Flustre-release.git diff --git a/lnet/klnds/gnilnd/gnilnd_cb.c b/lnet/klnds/gnilnd/gnilnd_cb.c index 6be0b2a..fbcec23 100644 --- a/lnet/klnds/gnilnd/gnilnd_cb.c +++ b/lnet/klnds/gnilnd/gnilnd_cb.c @@ -538,16 +538,17 @@ kgnilnd_setup_immediate_buffer(kgn_tx_t *tx, unsigned int niov, niov = DIV_ROUND_UP(nob + offset + kiov->bv_offset, PAGE_SIZE); - LASSERTF(niov > 0 && niov < GNILND_MAX_IMMEDIATE/PAGE_SIZE, - "bad niov %d msg %p kiov %p offset %d nob%d\n", - niov, msg, kiov, offset, nob); - while (offset >= kiov->bv_len) { offset -= kiov->bv_len; niov--; kiov++; LASSERT(niov > 0); } + + LASSERTF(niov > 0 && niov < GNILND_MAX_IMMEDIATE/PAGE_SIZE, + "bad niov %d msg %p kiov %p offset %d nob%d\n", + niov, msg, kiov, offset, nob); + for (i = 0; i < niov; i++) { /* We can't have a bv_offset on anything but the first * entry, otherwise we'll have a hole at the end of the @@ -2042,8 +2043,6 @@ kgnilnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg) LASSERTF(nob == 0 || niov > 0, "lntmsg %p nob %d niov %d\n", lntmsg, nob, niov); - LASSERTF(niov <= GNILND_MAX_IOV, - "lntmsg %p niov %d\n", lntmsg, niov); if (msg_vmflush) mpflag = memalloc_noreclaim_save();