From patchwork Fri Jun 27 19:08:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 365178 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A276D1400B5 for ; Sat, 28 Jun 2014 06:46:11 +1000 (EST) Received: from localhost ([::1]:51959 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0bYm-0006uh-A9 for incoming@patchwork.ozlabs.org; Fri, 27 Jun 2014 15:11:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0bWX-0004fu-B3 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 15:09:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0bWS-0006qc-77 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 15:09:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0bWR-0006qJ-VM for qemu-devel@nongnu.org; Fri, 27 Jun 2014 15:09:20 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5RJ9IMt009299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Jun 2014 15:09:19 -0400 Received: from noname.redhat.com (ovpn-116-40.ams2.redhat.com [10.36.116.40]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5RJ97bO027690; Fri, 27 Jun 2014 15:09:18 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Fri, 27 Jun 2014 21:08:25 +0200 Message-Id: <1403896146-3063-7-git-send-email-kwolf@redhat.com> In-Reply-To: <1403896146-3063-1-git-send-email-kwolf@redhat.com> References: <1403896146-3063-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com Subject: [Qemu-devel] [PULL 06/47] block/nfs: add knob to set readahead X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Lieven 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 Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/nfs.c | 4 ++++ 1 file changed, 4 insertions(+) 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);