Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50e1092b3a119bb4660bb6bd2e1749dc2d8ac62e
Commit:     50e1092b3a119bb4660bb6bd2e1749dc2d8ac62e
Parent:     5cef338b30c110daf547fb13d99f0c77f2a79fbc
Author:     James Lentini <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 10 11:24:48 2007 -0500
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Dec 11 22:01:59 2007 -0500

    SUNRPC xprtrdma: fix XDR tail buf marshalling for all ops
    
    rpcrdma_convert_iovs is passed an xdr_buf representing either an RPC
    request or an RPC reply. In the case of a request, several
    calculations and tests involving pos are unnecessary. In the case of a
    reply, several calculations and tests involving pos are incorrect (the
    code tests pos against the reply xdr buf's len field, which is always
    0 at the time rpcrdma_convert_iovs is executed). This change removes
    the incorrect/unnecessary calculations and tests involving pos.
    
    This fixes an observed problem when reading certain file sizes over
    NFS/RDMA.
    
    Signed-off-by: Tom Tucker <[EMAIL PROTECTED]>
    Signed-off-by: Tom Talpey <[EMAIL PROTECTED]>
    Signed-off-by: James Lentini <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 net/sunrpc/xprtrdma/rpc_rdma.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 9e11ce7..ee8de7a 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -92,7 +92,6 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos,
                seg[n].mr_page = NULL;
                seg[n].mr_offset = xdrbuf->head[0].iov_base;
                seg[n].mr_len = xdrbuf->head[0].iov_len;
-               pos += xdrbuf->head[0].iov_len;
                ++n;
        }
 
@@ -104,7 +103,6 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos,
                seg[n].mr_len = min_t(u32,
                        PAGE_SIZE - xdrbuf->page_base, xdrbuf->page_len);
                len = xdrbuf->page_len - seg[n].mr_len;
-               pos += len;
                ++n;
                p = 1;
                while (len > 0) {
@@ -119,20 +117,15 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, int pos,
                }
        }
 
-       if (pos < xdrbuf->len && xdrbuf->tail[0].iov_len) {
+       if (xdrbuf->tail[0].iov_len) {
                if (n == nsegs)
                        return 0;
                seg[n].mr_page = NULL;
                seg[n].mr_offset = xdrbuf->tail[0].iov_base;
                seg[n].mr_len = xdrbuf->tail[0].iov_len;
-               pos += xdrbuf->tail[0].iov_len;
                ++n;
        }
 
-       if (pos < xdrbuf->len)
-               dprintk("RPC:       %s: marshaled only %d of %d\n",
-                               __func__, pos, xdrbuf->len);
-
        return n;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to