aboutsummaryrefslogtreecommitdiff
path: root/block/nfs.c
diff options
context:
space:
mode:
authorPeter Lieven <pl@kamp.de>2014-06-25 00:06:01 +0200
committerKevin Wolf <kwolf@redhat.com>2014-06-26 13:51:01 +0200
commitf42ca3cad10f74777481c201722b598763e1771c (patch)
tree5e441b9cf55b0cd29ac20d295ba306f3f2c370f5 /block/nfs.c
parent7c24384b3b984f0256ba10eb26d877ec28985019 (diff)
block/nfs: add knob to set readahead
upcoming libnfs will feature internal readahead support. Add a knob to pass the optional readahead value as a URL parameter. Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/nfs.c')
-rw-r--r--block/nfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/nfs.c b/block/nfs.c
index 0b44483871..8439e0d389 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -321,6 +321,10 @@ static int64_t nfs_client_open(NFSClient *client, const char *filename,
nfs_set_gid(client->context, val);
} else if (!strcmp(qp->p[i].name, "tcp-syncnt")) {
nfs_set_tcp_syncnt(client->context, val);
+#ifdef LIBNFS_FEATURE_READAHEAD
+ } else if (!strcmp(qp->p[i].name, "readahead")) {
+ nfs_set_readahead(client->context, val);
+#endif
} else {
error_setg(errp, "Unknown NFS parameter name: %s",
qp->p[i].name);