Skip to content

Commit f852702

Browse files
amschuma-ntapTrond Myklebust
authored andcommitted
NFSv4.2: Fix up READ_PLUS alignment
Assume that the first segment will be a DATA segment, and place the data directly into the xdr pages so it doesn't need to be shifted. Signed-off-by: Anna Schumaker <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 36357fe commit f852702

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fs/nfs/nfs42xdr.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@
4747
#define decode_deallocate_maxsz (op_decode_hdr_maxsz)
4848
#define encode_read_plus_maxsz (op_encode_hdr_maxsz + \
4949
encode_stateid_maxsz + 3)
50-
#define NFS42_READ_PLUS_SEGMENT_SIZE (1 /* data_content4 */ + \
50+
#define NFS42_READ_PLUS_DATA_SEGMENT_SIZE \
51+
(1 /* data_content4 */ + \
5152
2 /* data_info4.di_offset */ + \
52-
2 /* data_info4.di_length */)
53+
1 /* data_info4.di_length */)
5354
#define decode_read_plus_maxsz (op_decode_hdr_maxsz + \
5455
1 /* rpr_eof */ + \
5556
1 /* rpr_contents count */ + \
56-
2 * NFS42_READ_PLUS_SEGMENT_SIZE)
57+
NFS42_READ_PLUS_DATA_SEGMENT_SIZE)
5758
#define encode_seek_maxsz (op_encode_hdr_maxsz + \
5859
encode_stateid_maxsz + \
5960
2 /* offset */ + \

0 commit comments

Comments
 (0)