Commit Graph

27 Commits (fac3a95453c392a01f8ec18c94368afa92564ba7)

Author SHA1 Message Date
Peter Lieven 9cb49494c7 pdu: drop the rpc->encodebuf
the only call thar really needs a big encodebuf is WRITE. So give each
PDU its private encodebuf. This avoids the need to memcpy the data from
the static rpc->encodebuf to the pdu->outdata.data.

Signed-off-by: Peter Lieven <pl@kamp.de>
2016-06-02 09:12:53 +02:00
Stefan Blanke 4a58e61455 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>
2014-11-03 17:23:17 -08:00
Ross Lagerwall 11cf77ceca Map NFS3ERR_NOTEMPTY to ENOTEMPTY
Map NFS3ERR_NOTEMPTY to ENOTEMPTY rather than EEXIST.  POSIX allows
either EEXIST or ENOTEMPTY for rmdir on a non-empty directory but
ENOTEMPTY is more explicit and in line with Linux, OS X, FreeBSD and
OpenBSD's behavior.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
2014-08-08 20:21:58 +01:00
Ronnie Sahlberg dc3ed8c3ab Fix some compiler warnings and bugs
Add missing %s to two example programs and fix incorrect argument to
rpc_nfs3_fsinfo_async()
2013-12-26 10:40:37 -08:00
Ronnie Sahlberg f38aacf8c9 Add NFSv2 RPC support 2013-12-24 11:28:56 -08:00
Ronnie Sahlberg 463d59bf8e NFS: Add new function signatures for rpc_nfs3_ that takes *3args arguments
to match the XDR.

Leave the existing ad-hoc rpc_nfs_* functions for backward compatibility.
2013-12-24 11:16:21 -08:00
Ronnie Sahlberg 6f914247fb Add support for NFS/PATHCONF 2013-10-20 10:07:19 -07:00
Memphiz e7b4eb0a33 [cosmetics] - removed trailing semicolon 2013-05-29 18:41:17 +02:00
Ronnie Sahlberg 763cd6e3e2 ZDR: New builtin replacement for RPC/XDR called ZDR
This patch switches libnfs over to use precompiled rpcgen files
and using ZDR.  ZDR is a trivial reimplementation of XDR that is built in
into libnfs.

This removes the dependencies of rpc/xdr completely and allow us to build on any
system, even systems where rpcgen and librpc/libxdr are not generally available.
2012-07-04 16:53:12 +10:00
Ronnie Sahlberg 8e25581668 change rpc_nfs_symlink_async to take a full SYMLINK3args as parameter 2012-01-14 08:18:19 +11:00
Ronnie Sahlberg 16104b27bd make low level readlink_async function take READLINK3args as argument 2012-01-14 08:11:09 +11:00
Ronnie Sahlberg 7edc9026db make mkdir_async take a full MKDIR3args argument 2012-01-12 16:02:32 +11:00
Ronnie Sahlberg bac0bc5404 rpc_nfs_create_async, args is now a pointer, not a structur
so we shouldnt take the address of it
2012-01-12 15:56:02 +11:00
Ronnie Sahlberg c985c015f2 change crate_async low level function to take a full RATE3args structure as argument instead of just name and mode 2012-01-12 15:31:49 +11:00
Ronnie Sahlberg 183451cff5 Remove all [s]size_t / off_t and replace with [u]int64_t making libnfs 64-bit pure 2011-11-27 14:49:08 +11:00
Ronnie Sahlberg 1ec6b50aef Add MKNOD command support
Add support for raw nfs3 mknod  and sync and async posixlike api
2011-11-27 14:08:24 +11:00
Memphiz fcc42bfe85 [win32] - completed win32 port 2011-09-12 19:53:33 +02:00
Memphiz a8a1b85846 [win32] - make it compile on win32 2011-09-03 15:08:48 +10:00
Ronnie Sahlberg ea98629aef memset() is posix, bzero() is not change bzero into memset 2011-09-03 14:11:22 +10:00
Ronnie Sahlberg 4ed97718b3 Merge branch 'master' into win32-3 2011-09-03 11:11:36 +10:00
Ronnie Sahlberg 42f43e48cc cast the pointer to char * for all calls to bzero 2011-09-03 11:08:58 +10:00
Ronnie Sahlberg 41d82d7d82 Merge branch 'win32' into win32-3 2011-09-03 10:57:42 +10:00
Ronnie Sahlberg f390f18157 nfs_opendir() switch to using READDIRPLUS3 instead of READDIR3 when reading directories. 2011-09-02 20:27:01 +10:00
Ronnie Sahlberg eecdc4f3cd Win32 changes, include files we need when compiling under win32
and some socket ops are slightly different
2011-08-28 19:24:18 +10:00
Memphis 98f5fee87d - linux, osx, and ios need rpc/rpc.h includede before rpc/xdr.h
- fixed some missing includes for bzero, malloc and free
2011-06-01 18:06:15 +02:00
Ronnie Sahlberg 1058201ef0 Add support for async version of NFS/FSINFO3 call 2011-05-31 23:50:18 +10:00
Ronnie Sahlberg 84004dbf9b initial libnfs checkin 2011-02-06 15:45:09 +11:00