提交 f8527028 编写于 作者: A Anna Schumaker 提交者: Trond Myklebust

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: NAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 36357fe7
...@@ -47,13 +47,14 @@ ...@@ -47,13 +47,14 @@
#define decode_deallocate_maxsz (op_decode_hdr_maxsz) #define decode_deallocate_maxsz (op_decode_hdr_maxsz)
#define encode_read_plus_maxsz (op_encode_hdr_maxsz + \ #define encode_read_plus_maxsz (op_encode_hdr_maxsz + \
encode_stateid_maxsz + 3) encode_stateid_maxsz + 3)
#define NFS42_READ_PLUS_SEGMENT_SIZE (1 /* data_content4 */ + \ #define NFS42_READ_PLUS_DATA_SEGMENT_SIZE \
(1 /* data_content4 */ + \
2 /* data_info4.di_offset */ + \ 2 /* data_info4.di_offset */ + \
2 /* data_info4.di_length */) 1 /* data_info4.di_length */)
#define decode_read_plus_maxsz (op_decode_hdr_maxsz + \ #define decode_read_plus_maxsz (op_decode_hdr_maxsz + \
1 /* rpr_eof */ + \ 1 /* rpr_eof */ + \
1 /* rpr_contents count */ + \ 1 /* rpr_contents count */ + \
2 * NFS42_READ_PLUS_SEGMENT_SIZE) NFS42_READ_PLUS_DATA_SEGMENT_SIZE)
#define encode_seek_maxsz (op_encode_hdr_maxsz + \ #define encode_seek_maxsz (op_encode_hdr_maxsz + \
encode_stateid_maxsz + \ encode_stateid_maxsz + \
2 /* offset */ + \ 2 /* offset */ + \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册