aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs/Connection.cxx (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Copyright year 2015Max Kellermann2015-01-011-1/+1
|
* lib/nfs/Connection: unregister socket with SocketMonitor::Steal()Max Kellermann2014-12-151-1/+1
| | | | | SocketMonitor::Cancel() does not actually unregister the socket; it only disables the event.
* lib/nfs/Connection: implement mount timeoutMax Kellermann2014-12-151-0/+24
|
* lib/nfs/Connection: add debug flag "in_destroy"Max Kellermann2014-12-151-0/+6
|
* lib/nfs/Connection: add assertionMax Kellermann2014-12-141-0/+2
|
* lib/nfs/Connection: fix reconnect after mount failureMax Kellermann2014-12-141-1/+1
| | | | | | | When mounting had not yet finished, SocketMonitor::IsDefined() was always false, due to the workaround at the beginning of the function that calls SocketMonitor::Steal(). This commit drops the IsDefined() check because it was never necessary and breaks reconnect.
* lib/nfs/Connection: fix typo in code commentMax Kellermann2014-12-141-1/+1
|
* lib/nfs/Connection: fix memory leak (and assertion failure)Max Kellermann2014-12-141-0/+15
| | | | | | | | | | | nfs_destroy_context() will invoke all pending callbacks with err==-EINTR. In CancellableCallback::Callback(), this will invoke NfsConnection::DeferClose(), which however is only designed to be called from nfs_service(). In non-debug mode, this will leak memory because nfs_close_async() is never called. Workaround: before nfs_destroy_context(), invoke nfs_close_async() on all pending file handles.
* lib/nfs/Connection: move code to Service()Max Kellermann2014-12-141-12/+23
|
* lib/nfs/Connection: add assertionsMax Kellermann2014-12-141-0/+2
|
* lib/nfs/Connection: move code to method InternalClose()Max Kellermann2014-12-141-3/+12
|
* lib/nfs/Connection: make in_service and in_event debug-only flagsMax Kellermann2014-12-141-0/+9
|
* lib/nfs/Connection: fix crash while canceling a failing Open()Max Kellermann2014-12-141-2/+4
| | | | | | | The method NfsConnection::CancellableCallback::Callback() will always invoke NfsConnection::Close() on the file handle, even if the void pointer is not a nfsfh. This can happen if the Open() was not successful, e.g. when the file does not exist.
* lib/nfs/Connection: add assertionsMax Kellermann2014-12-141-0/+31
|
* lib/nfs/Connection: broadcast error before closing connectionMax Kellermann2014-11-251-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.
* lib/nfs/Connection: cancel DeferredMonitor on disconnectMax Kellermann2014-11-251-0/+4
| | | | | Fixes potential second mount attempt after the old connection to the NFS server was shut down.
* lib/nfs/Connection: reduce Error instance allocationsMax Kellermann2014-10-091-3/+2
|
* lib/nfs/Connection: add methods {Open,Read,Close}Directory()Max Kellermann2014-10-071-0/+43
|
* lib/nfs/Connection: add method Stat(path)Max Kellermann2014-10-071-0/+30
|
* lib/nfs/FileReader: postpone the nfs_close_async() callMax Kellermann2014-10-011-1/+42
| | | | | | 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().
* lib/nfs/Connection: fix memory leak when cancelling Open()Max Kellermann2014-10-011-3/+11
| | | | Close the newly allocated file handle passed to the callback.
* lib/nfs/Connection: remove MutexMax Kellermann2014-10-011-15/+12
| | | | | All locks are currenly held from only a single thread (the IOThread) and thus we don't need the Mutex.
* lib/nfs/Connection: add method GetEventLoop()Max Kellermann2014-10-011-1/+1
|
* lib/nfs/Connection: remove obsolete flag postponed_destroyMax Kellermann2014-10-011-9/+1
|
* lib/nfs/Glue: destruct the NfsManager in the I/O threadMax Kellermann2014-10-011-4/+3
| | | | | This allows eliminating the indirection code from the NfsConnection destructor.
* lib/nfs/Cancellable: use boost::intrusive::listMax Kellermann2014-10-011-3/+3
| | | | | Reduce Remove() overhead because we don't have to walk the list to find an iterator by reference.
* nfs/Connection: check for disappearing libnfs socketMax Kellermann2014-08-311-0/+18
|
* nfs/Connection: use only BroadcastError()Max Kellermann2014-08-311-4/+1
| | | | | Since BroadcastError() calls BroadcastMountError(), there's no need to check mount_finished here.
* nfs/Connection: nfs_get_fd() can return -1Max Kellermann2014-08-311-0/+3
| | | | | While reconnecting to the NFS server, the socket is -1, because there is no socket. Fixes a potential crash (assertion failure).
* nfs/Connection: use nfs_get_error() for mount errorMax Kellermann2014-08-311-2/+3
|
* nfs/Connection: fix assertion failureMax Kellermann2014-08-311-1/+3
|
* lib/nfs/Connection: include poll.hMax Kellermann2014-06-301-0/+2
|
* input/nfs: use the asynchronous libnfs APIMax Kellermann2014-06-171-0/+415
More robust and cancellable.