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 <stefan.blanke@framestore.com>
Signed-off-by: Mark Hills <mark.hills@framestore.com>
libnfs-4.0.0-vitalif
Stefan Blanke 2014-10-30 16:32:43 +00:00 committed by Ronnie Sahlberg
parent ab1af6953c
commit 4a58e61455
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}