- Reduce the number of memory allocations in the ZDR layer.
- Check both seconds and nanoseconds field when validating dir cache.
- Invalidate the dir cache immediately if we do something that would cause
it to become stale, such as adding/removing objects from the cache.
- Add options to enable/disable dir caching.
- Discard readahead cache on [p]write and truncate.
- Android fixes
- Windows fixes
- Support timeouts for sync functions
- Add an internal pagecache
- Add nfs_rewinddir(), nfs_seekdir() and nfs_telldir()
- Fix crash in nfs_truncate()
- Fix segfault that can trigger if we rpc_disconnect() during the mount.
- Add support to bind to a specific interface (linux only)
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
`nfs_set_interface` and `rpc_set_interface` APIs, or via the
NFS URL `if=<interface>` parameter. This feature requires
`root` permissions.
NOTE: This has only been compiled and tested on Ubuntu 14.04. It's
unlikely that it'll work on other platforms without modification,
particularly around the inclusion of <net/if.h> and IFNAMSIZ define
in `libnfs-private.h`.
The biggest changes in this release are:
- Fix a leak where we leaked one rdpe_cb_data structure on each open_dir()
- Make building the utils optional
- Android: the correct define is __ANDROID__ not ANDROID
- Win32: Use _U_ instead of ATTRIBURE((unused))
- Win32: Fix nfs_stat declaration for Win32
- Various fixes for mingw builds
- Make rpc->connect_cb a one shot callback and improve documentation
- Remove the FUSE module. It now lives in its own repo
- Fix POLLERR/POLLHUP handling to properly handle session failures and to
try to auto-reconnect
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
- Disable multithreading in fuse_nfs
- Add -Wall and -Werror compiler flags (and fix issues found by it)
- Add nfs-cat utility
- Switch to using nfs_[f]stat64 instead of the deprecated nfs_[f]stat call
in all examples
- If the server does not return any atttributes for entries in READDIRPLUS
then try to fetch them using lookup instead.
- Reconnection fixes
- Enforce the max pdu size and add sanity checks when reading PDUs from
the socket.
- Stop using ioctl(FIONREAD) to find out how many bytes to read, and treat
0 as an indication of a problem. Some applications call their POLLIN handlers
spuriosly even when there is no data to read, which breaks this check in
libnfs.
- Add basic support to do logging.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Update the configure to add some sanity -W arguments.
A good start is probably :
-Wall -Werror -Wshadow -Wno-write-strings -Wstrict-prototypes
-Wpointer-arith -Wcast-align -Wno-strict-aliasing
Fixup the paces in the code that triggers.
(one of which is readahead code which is perhaps broken?)
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
- Auto-traverse mounts. With this option (default to on) libnfs will
autodiscover and handle any nested submounts.
- Remove nfs_get_current_offset. Applications should use seek instead of this function.
- Add umask() support.
- Change set_tcp_sockopt() to be static.
- Android fix for nfs-ls
- Make S_IFLNK available on windows.
- Fix a use after free.
- Fix a bug where truncate() treated offset as 32bit.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
- Add O_TRUNC support for nfs_create
- Handle OOM during create
- Return more stats fields as part of readdir since we get these for "free"
when we use READDIRPLUS
- Follow symlinks during path resolution
- Add lchown, lstat and lutimes
- Replace all [u_]quad types with [u]int types in our RPC layer
- Solaris build fixes
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Set as much stat information as possible for stat, stat64, fstat and
readdir.
Fill in dev to the given fsid.
Fill in rdev to the given major and minor numbers.
Set the file type bits in the mode from the type returned by the server.
Set the number of blocks used based on the number of bytes used in
blocks of size 512 (which is what stat(2) uses), rounded up.
Fill in the nanosecond timestamps.
Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
This version removes old ONC-RPC symbols and automatically includes the
RPC/ZDR layer include from the raw low level headers.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
New version of libnfs:
- IPv6 support
- Support for Portmapper version 3 and an example portmap client.
- Directory caching top make repeated opendir() calls faster
- Readahead support
- Build manpages for the utilities (==nfs-ls)
- Support for O_APPEND
- Rename the list macros to avoid collission on *BSD
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Wed Mar 19 2014: Version 1.9.3
- Add O_TRUNC support to nfs_open()
- Add a simple but incomplete LD_PRELOAD tool
- Fixes for some memory leaks and C++ compile support
- Make ANDROID default uid/gid to 65534
- Allow the READDIRPLUS emulation to still work if some objects
in the direcotry can not be lookedup (NFSv4 ACL denying READ-ATTRIBUTES)
- Have libnfs retry any read/write operations where the server responds
with a short read/write. Some servers do this when they are overloaded?
- Use _stat64 on windows so file sizes become 64bit always.
- Increase default marshalling buffer so we can marshall large PDUs.
- RPC layer support for NFSv2
- Win32 updates and fixes
- Add URL parsing functions and URL argument support.
- New utility: nfs-io
- nfs-ls enhancements
- RPC layer support for NSM
- Add example FUSE filesystem.
- Minor fixes.
I need this to detect that we have (almost) version 1.9.0 in qemu,
but I think we should do some more testing before releasing 1.9.0.
Signed-off-by: Peter Lieven <pl@kamp.de>
This allows indirect support for a configurable connect timeout.
Linux uses a exponential backoff for SYN retries starting
with 1 second.
This means for a value n for TCP_SYNCNT, the connect will
effectively timeout after 2^(n+1)-1 seconds.
Example:
examples/nfs-ls nfs://10.0.0.1/export?tcp-syncnt=1
Signed-off-by: Peter Lieven <pl@kamp.de>
- Allow nested eventloops so that a sync function can be called from a callback.
- Fix a bug in unmarshalling a uint64.
- Add PATHCONF support.
- WIN32/64 updates
- AROS updates
Add AROS/Amiga support
Chose initial XID value better to reduce probability for collissions
Fix bug in the initial default credentials and use getgid() instead of -1
- Add trackig of freed context and assert on using a context after it has been
freed.
- Windows x64 support and fixes.
- Switch to using our own version of xdr_int64() since the one in libtirpc
crashes on some platforms.
- Fix memory leak in an error path for addrinfo.
- Fix bug dereferencing a null pointer in the mount callback on error.