Revert "svcrdma: Do not send XDR roundup bytes for a write chunk"
This reverts commit 6f18dc8939
.
Just as one example, it appears this code could do the wrong thing in
the case of a two-byte NFS READ that crosses a page boundary.
Chuck says: "In that case, nfsd would pass down an xdr_buf that has one
byte in a page, one byte in another page, and a two-byte XDR pad. The
logic introduced by this optimization would be fooled, and neither the
second byte nor the XDR pad would be written to the client."
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
0751ddf77b
commit
3daa020f9b
@ -342,13 +342,6 @@ static int send_write_chunks(struct svcxprt_rdma *xprt,
|
|||||||
arg_ch->rs_handle,
|
arg_ch->rs_handle,
|
||||||
arg_ch->rs_offset,
|
arg_ch->rs_offset,
|
||||||
write_len);
|
write_len);
|
||||||
|
|
||||||
/* Do not send XDR pad bytes */
|
|
||||||
if (chunk_no && write_len < 4) {
|
|
||||||
chunk_no++;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
chunk_off = 0;
|
chunk_off = 0;
|
||||||
while (write_len) {
|
while (write_len) {
|
||||||
ret = send_write(xprt, rqstp,
|
ret = send_write(xprt, rqstp,
|
||||||
|
Loading…
Reference in New Issue
Block a user