aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-11-25lib/nfs/FileReader: update "state" in OnNfsError()Max Kellermann1-0/+24
Clean up the "state" to indicate that there is no longer any asynchronous operation. Fixes another NFS-related crash due to cleanup of a non-existing asynchronous operation.
2014-11-25lib/nfs/Manager: defer NfsConnection destructionMax Kellermann2-9/+54
Avoids a crash that occurs when NfsConnection::OnSocketReady() dereferences itself before returning.
2014-11-25lib/nfs/Connection: broadcast error before closing connectionMax Kellermann1-4/+4
During the NfsLease::OnNfsConnectionFailed() call, the old (defunct) nfs_context may be used to close file handles. Such code does not yet exist, but will be added soon to fix other bugs.
2014-11-25lib/nfs/Connection: cancel DeferredMonitor on disconnectMax Kellermann1-0/+4
Fixes potential second mount attempt after the old connection to the NFS server was shut down.
2014-11-25lib/nfs/FileReader: include Compiler.h for "final" fallbackMax Kellermann1-0/+1
2014-10-09storage/nfs: use the libnfs async APIMax Kellermann2-0/+169
Share the NFS connection with the NFS input plugin.
2014-10-09lib/nfs/Connection: reduce Error instance allocationsMax Kellermann1-3/+2
2014-10-09lib/nfs/Glue: add assertionMax Kellermann1-0/+1
2014-10-07lib/nfs/Connection: add methods {Open,Read,Close}Directory()Max Kellermann2-0/+53
2014-10-07lib/nfs/Connection: add method Stat(path)Max Kellermann2-0/+33
2014-10-06lib/nfs/Connection: make GetEventLoop() publicMax Kellermann1-4/+4
2014-10-05lib/nfs/Base: kludge to reduce number of NFS mountsMax Kellermann3-7/+124
Creating a NfsStorage sets its own export_name as the "base". Now NfsFileReader can use this information to derive the export_name to be mounted, instead of guessing. This solves the "too many connection" problem on the NFS server while updating the database.
2014-10-01lib/nfs/FileReader: postpone the nfs_close_async() callMax Kellermann4-6/+92
If an async opertion is in progress, nfs_close_async() will make libnfs crash because the RPC callback will dereference an object that was freed by nfs_close_async().
2014-10-01lib/nfs/Connection: fix memory leak when cancelling Open()Max Kellermann2-5/+23
Close the newly allocated file handle passed to the callback.
2014-10-01lib/nfs/Connection: remove MutexMax Kellermann2-18/+12
All locks are currenly held from only a single thread (the IOThread) and thus we don't need the Mutex.
2014-10-01lib/nfs/Connection: add method GetEventLoop()Max Kellermann2-1/+5
2014-10-01lib/nfs/Connection: remove obsolete flag postponed_destroyMax Kellermann2-18/+2
2014-10-01lib/nfs/Connection: remove deprecated move constructor workaroundMax Kellermann1-16/+0
Not used anymore because NfsManager now uses boost::intrusive::set instead of std::map.
2014-10-01lib/nfs/Manager: use boost::intrusive::mapMax Kellermann2-37/+78
Reduce overhead for storing the key twice, and more overhead while looking up the connection to remove it after a failure.
2014-10-01lib/nfs/Glue: add assertionMax Kellermann1-0/+4
2014-10-01lib/nfs/Glue: destruct the NfsManager in the I/O threadMax Kellermann3-5/+8
This allows eliminating the indirection code from the NfsConnection destructor.
2014-10-01lib/nfs/Glue: eliminate class NfsGlueMax Kellermann1-17/+1
It's just a useless wrapper for class NfsManager.
2014-10-01lib/nfs/Cancellable: use boost::intrusive::listMax Kellermann3-40/+18
Reduce Remove() overhead because we don't have to walk the list to find an iterator by reference.
2014-08-31nfs/Connection: check for disappearing libnfs socketMax Kellermann1-0/+18
2014-08-31nfs/Connection: use only BroadcastError()Max Kellermann1-4/+1
Since BroadcastError() calls BroadcastMountError(), there's no need to check mount_finished here.
2014-08-31nfs/Connection: nfs_get_fd() can return -1Max Kellermann1-0/+3
While reconnecting to the NFS server, the socket is -1, because there is no socket. Fixes a potential crash (assertion failure).
2014-08-31nfs/Connection: use nfs_get_error() for mount errorMax Kellermann1-2/+3
2014-08-31nfs/Connection: fix assertion failureMax Kellermann1-1/+3
2014-08-30*: add missing Compiler.h includesMax Kellermann1-0/+1
Necessary for "final" on gcc 4.6.
2014-06-30lib/nfs/Connection: include poll.hMax Kellermann1-0/+2
2014-06-17lib/nfs/Manager: gcc 4.7 compatibility hackMax Kellermann3-0/+32
std::map::emplace() is only available from gcc 4.8 on.
2014-06-17input/nfs: use the asynchronous libnfs APIMax Kellermann11-0/+1398
More robust and cancellable.
2014-02-08input/nfs: move nfs_domain to lib/nfs/Domain.cxxMax Kellermann2-0/+51