From d43a8953f531478fa8bfd9eb60a0de257cd06814 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Mon, 13 Jan 2014 11:22:21 +0100 Subject: [PATCH] make adjustments for v6 of the qemu NFS driver Signed-off-by: Peter Lieven --- configure.ac | 2 +- include/nfsc/libnfs.h | 7 +++++++ lib/libnfs.c | 12 ++++++++++++ lib/socket.c | 4 ++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 98599ee..4ebf6f5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.50) -AC_INIT([libnfs], [1.8.90], [ronniesahlberg@gmail.com]) +AC_INIT([libnfs], [1.8.91], [ronniesahlberg@gmail.com]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign]) AC_CANONICAL_HOST diff --git a/include/nfsc/libnfs.h b/include/nfsc/libnfs.h index 388ea78..7a9accd 100644 --- a/include/nfsc/libnfs.h +++ b/include/nfsc/libnfs.h @@ -166,6 +166,13 @@ EXTERN uint64_t nfs_get_readmax(struct nfs_context *nfs); */ EXTERN uint64_t nfs_get_writemax(struct nfs_context *nfs); +/* + * MODIFY CONNECT PARAMTERS + */ + +EXTERN void nfs_set_tcp_syncnt(struct nfs_context *nfs, int v); +EXTERN void nfs_set_uid(struct nfs_context *nfs, int uid); +EXTERN void nfs_set_gid(struct nfs_context *nfs, int gid); /* * MOUNT THE EXPORT diff --git a/lib/libnfs.c b/lib/libnfs.c index ca8ed37..6183719 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -3904,6 +3904,18 @@ uint64_t nfs_get_writemax(struct nfs_context *nfs) return nfs->writemax; } +void nfs_set_tcp_syncnt(struct nfs_context *nfs, int v) { + rpc_set_tcp_syncnt(nfs->rpc, v); +} + +void nfs_set_uid(struct nfs_context *nfs, int uid) { + rpc_set_uid(nfs->rpc, uid); +} + +void nfs_set_gid(struct nfs_context *nfs, int gid) { + rpc_set_gid(nfs->rpc, gid); +} + void nfs_set_error(struct nfs_context *nfs, char *error_string, ...) { va_list ap; diff --git a/lib/socket.c b/lib/socket.c index 1676084..152dfb4 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -399,6 +399,10 @@ void rpc_set_tcp_syncnt(struct rpc_context *rpc, int v) rpc->tcp_syncnt = v; } +#ifndef TCP_SYNCNT +#define TCP_SYNCNT 7 +#endif + static int rpc_connect_sockaddr_async(struct rpc_context *rpc, struct sockaddr_storage *s) { int socksize; -- 2.34.1