From: Stefan Blanke Date: Thu, 30 Oct 2014 16:32:43 +0000 (+0000) Subject: Issue READIRPLUS calls with a sensible dircount maxcount ratio X-Git-Tag: upstream/1.9.6^2~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=4a58e6145568fd21ef956ae6ac3d3c37ef209a57;p=deb_libnfs.git Issue READIRPLUS calls with a sensible dircount maxcount ratio The NFS spec states: "The ratio of the directory entry size to the size of the attributes plus the size of the file handle is usually at least 8 to 1." Though implementation dependent the spec implies that the previous 1 to 1 ratio could have a detrimental impact on the performance of the server due to most of the data per VOP_READDIR call being wasted. The Linux kernel uses the 8 to 1 ratio. Signed-off-by: Stefan Blanke Signed-off-by: Mark Hills --- diff --git a/nfs/nfs.c b/nfs/nfs.c index 286ced0..335c67b 100644 --- a/nfs/nfs.c +++ b/nfs/nfs.c @@ -697,7 +697,7 @@ int rpc_nfs_readdirplus_async(struct rpc_context *rpc, rpc_cb cb, struct nfs_fh3 args.cookie = cookie; memcpy(&args.cookieverf, cookieverf, sizeof(cookieverf3)); args.dircount = count; - args.maxcount = count; + args.maxcount = count * 8; return rpc_nfs3_readdirplus_async(rpc, cb, &args, private_data); }