diff mbox

[PATCHv3,2/2] block/nfs: add knob to set readahead

Message ID 1403647561-19534-3-git-send-email-pl@kamp.de
State New
Headers show

Commit Message

Peter Lieven June 24, 2014, 10:06 p.m. UTC
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>
---
 block/nfs.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Eric Blake June 24, 2014, 11:27 p.m. UTC | #1
On 06/24/2014 04:06 PM, Peter Lieven wrote:
> 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>
> ---
>  block/nfs.c |    4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/block/nfs.c b/block/nfs.c
index 0b44483..8439e0d 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);