42852 Commits

Author SHA1 Message Date
Pawel Dziepak
65edbee7c8 nfs4: DirectoryCache::GetSnapshot may return NULL 2013-01-16 10:47:35 +01:00
Pawel Dziepak
1c6f502549 nfs4: Add not null assertions for Inode::fOpenState and fDelegation 2013-01-16 09:52:10 +01:00
Pawel Dziepak
9c1d983eab nfs4: Avoid using empty string for RootInode name 2013-01-08 23:57:24 +01:00
Pawel Dziepak
2d96a2b303 nfs4: Minor improvements to memory deallocation in few places 2013-01-08 23:57:14 +01:00
Pawel Dziepak
9f12d1353a nfs4: Prevent OpenState::_ReclaimLocks from being called recursively
When server reboots again when share reservations or locks are being
reclaimed there is a risk that HandleErrors will invoke Reclaim(( again
making it crash due to some double locks and more importantly making
these two attempts to reclaim resources conflict and cause some much harder
to recover from server errors.

Instead all that, when server is rebooted again while recovering from previous
reboot the recovery is aborted, the client retries its original request and
then proper recovery occurs completly on a new server instance.
2013-01-08 23:10:56 +01:00
Pawel Dziepak
bd19f23cec nfs4: Fix connection recovery code 2013-01-08 20:07:56 +01:00
Pawel Dziepak
fea92e7bb3 nfs4: Save open mode in case of open reclaimation 2013-01-08 18:57:14 +01:00
Pawel Dziepak
d710e73de5 nfs4: Indentation fixes 2013-01-08 05:54:42 +01:00
Pawel Dziepak
b8982d12b7 nfs4: Do not increment open owner sequence number when reusing lock owner 2013-01-08 05:52:12 +01:00
Pawel Dziepak
e4cd963ff1 nfs4: Use default request timeout if FileSystem not given 2013-01-08 05:48:08 +01:00
Pawel Dziepak
ad1a84af93 nfs4: Make request time limit adjustable 2013-01-04 22:39:40 +01:00
Pawel Dziepak
dadd844f36 nfs4: Multiple style fixes 2013-01-04 22:25:21 +01:00
Pawel Dziepak
4d12040737 nfs4: Remove CacheRevalidator
There is no point in periodically revalidating all existing directory caches.
Directory snapshot can be revalidated when readdir is invoked.
2013-01-04 20:05:15 +01:00
Pawel Dziepak
332621d196 nfs4: Use DoublyLinkedList instead of custom FileSystem list implementation 2013-01-04 16:03:36 +01:00
Pawel Dziepak
d72bdcc88a nfs4: Do not remove RootInode too soon 2013-01-03 15:37:36 +01:00
Pawel Dziepak
e8ef557a56 nfs4: Fix double delete rpc when WaitCall fails 2013-01-03 03:25:50 +01:00
Pawel Dziepak
6136b82b1e nfs4: Fix handling of retried CLOSE requests 2013-01-03 03:25:34 +01:00
Pawel Dziepak
345a659337 nfs4: Do not create new Inode object when deleting a vnode 2013-01-02 20:18:32 +01:00
Pawel Dziepak
47e68f1c7a nfs4: Avoid conflicts between threads attempting to repair TCP connection 2013-01-02 20:17:57 +01:00
Pawel Dziepak
8837efd025 nfs4: FileSystem may be destroyed before setting RPCServer private data 2013-01-02 16:40:23 +01:00
Pawel Dziepak
68e64c7ab0 nfs4: Expect file system root path to be NULL 2013-01-02 16:26:57 +01:00
Pawel Dziepak
fee08ed6ad nfs4: Fix typo: NFS4ERR_LOCKS_HELD instead of NFS4ERR_LOCK_HELD 2013-01-02 16:20:06 +01:00
Pawel Dziepak
aa5a8cb346 nfs4: Add assertions for unexpected error codes
There are some NFS4 error codes we should not get if the client is operating
correctly.
CLID_INUSE may be caused only by incorrectly generated SETCLIENTID request.
NOFILEHANDLE, RESTOREFH and OP_ILLEGAL indicate that the client has sent
an incorrectly build request.
BAD_STATEID and BAD_SEQID indicate a bug in handling {open,lock}_owners.
LOCK_HELD happens when the client incorrectly cleans up after accessing a file.
2012-12-24 20:27:07 +01:00
Pawel Dziepak
eed5b716d0 nfs4: Fix problems with reading directory entries
* Inode::ReadDir missed an entry when given buffer was too small
 * Each OpenDirCookie now has its own copy of directory snapshot what
   would prevent Inode::ReadDir from accessing freed memory when removing
   files and reading directory entries simultaneously
 * Several minor issues fixed
2012-12-19 08:12:39 +01:00
Pawel Dziepak
aec9dfc921 nfs4: Release vnodes when no longer used 2012-12-04 01:35:00 +01:00
Pawel Dziepak
83444c2321 nfs4: Complete outstanding AIO requests before releasing open state 2012-12-03 22:47:45 +01:00
Pawel Dziepak
b352cbf6ca nfs4: Introduce VnodeToInode mapping
VnodeToInode is another abstraction layer between VFS vnodes and NFS nodes.
It simplifies dealing with race conditions as well as faking some guarantees
VFS expects but NFS does not provide.
2012-12-03 22:47:18 +01:00
François Revol
fa5d300d6b nfs4: Fix timespec attribute allocation size
* copying the time attributes was fixed to copy the whole
st_?tim timespec struct but the allocation size was still only
that of st_?time subfield, which is only a time_t.

Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Pawel Dziepak <pdziepak@quarnos.org>
2012-11-03 20:40:55 +01:00
Pawel Dziepak
2f44d34e5e nfs4: Reset object_wait_info.events in each iteration 2012-11-02 16:14:07 +01:00
Pawel Dziepak
81f2b97177 nfs4: Fix race condition between inode creation and removal
If the underlying file system reuses inode numbers it is possible that
an entry of inode with reused id in InodeIdMap will be removed.
This patch should also improve behavior when one of many hard links
is removed.
2012-11-01 18:34:26 +01:00
Pawel Dziepak
b70890b138 nfs4: Add basic tracing of nfs4 module calls 2012-11-01 17:42:04 +01:00
Pawel Dziepak
1e67a2cdd9 nfs4: Add numerous assertion checks 2012-11-01 00:17:34 +01:00
Pawel Dziepak
bb03552636 nfs4: Do not ignore idmapper initialization errors 2012-10-31 19:06:51 +01:00
Pawel Dziepak
a4cdd6be5f dns_resolver: Separate getaddrinfo() and reply serialization code 2012-10-31 18:57:17 +01:00
Pawel Dziepak
bcb18a9b36 nfs4, dns_resolver: fix numerous style violations 2012-10-31 16:17:22 +01:00
Pawel Dziepak
cae470f922 nfs4: Fix some cache revalidator problems 2012-09-14 19:00:30 +02:00
Pawel Dziepak
e422d059c8 nfs4: Properly handle NFS4ERR_DELAY during node rename 2012-08-17 03:32:57 +02:00
Pawel Dziepak
dee0fd8348 nfs4: Update FileInfo at rename 2012-08-17 03:22:26 +02:00
Pawel Dziepak
7c6cdb8360 nfs4: Fix node removal 2012-08-17 02:51:20 +02:00
Pawel Dziepak
8568341ae6 nfs4: Fix bugs when metadata cache is disabled 2012-08-17 01:28:48 +02:00
Pawel Dziepak
da950cb2ef nfs4: Fix several problems with emulated attributes 2012-08-17 01:14:30 +02:00
Pawel Dziepak
e8c12d9410 nfs4: Fix file handle recovery 2012-08-16 21:11:56 +02:00
Pawel Dziepak
060a4636e4 nfs4: Make the client more configurable 2012-08-16 19:59:50 +02:00
Pawel Dziepak
870528b799 nfs4: Fix gcc4 warnings 2012-08-16 03:41:29 +02:00
Pawel Dziepak
a15e8fcfbe nfs4: Check for semaphore creation errors in ConnectionBase classes 2012-08-16 03:06:36 +02:00
Pawel Dziepak
a37a22884c nfs4: Let GenerateClientID take advantage of PeerAddress methods 2012-08-16 02:52:15 +02:00
Pawel Dziepak
376eef4a9b nfs4: Add node to inode to file handle map before notifying 2012-08-16 02:24:53 +02:00
Pawel Dziepak
cd2c1203d3 dns_resolver: Fix addrinfo entries relocation 2012-08-16 02:01:34 +02:00
Pawel Dziepak
45cd64efd9 nfs4: Fix amount of data written when using AIO 2012-08-16 01:30:24 +02:00
Pawel Dziepak
c0344ea198 nfs4: Get correct change value for attribute directories 2012-08-15 04:22:18 +02:00