]> git.ipfire.org Git - people/ms/linux.git/commit - fs/nfsd/nfs4proc.c
NFSD: Get response size before operation for all RPCs
authorKinglong Mee <kinglongmee@gmail.com>
Fri, 3 Feb 2017 14:36:00 +0000 (22:36 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 17 Feb 2017 21:26:03 +0000 (16:26 -0500)
commit2282cd2c05e281120dedc665a8a6a24053c44662
treec6439c2171f7ea6d54c8e7ca2461fcf8347289de
parent827433801c3bcf21296915c42c1314fbb944b197
NFSD: Get response size before operation for all RPCs

NFSD usess PAGE_SIZE as the reply size estimate for RPCs which don't
support op_rsize_bop(), A PAGE_SIZE (4096) is larger than many real
response sizes, eg, access (op_encode_hdr_size + 2), seek
(op_encode_hdr_size + 3).

This patch just adds op_rsize_bop() for all RPCs getting response size.

An overestimate is generally safe but the tighter estimates are probably
better.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c