Commit Graph

42661 Commits

Author SHA1 Message Date
Pawel Dziepak
b268b6f2fc nfs4: Add rest of NFS4 error codes 2012-06-29 02:14:48 +02:00
Pawel Dziepak
462a54ced8 nfs4: Let ReplyInterpreter provide original NFS4 error codes 2012-06-29 02:14:47 +02:00
Pawel Dziepak
f2da914d39 nfs4: Add read_symlink() hook 2012-06-29 02:14:46 +02:00
Pawel Dziepak
27a291de54 nfs4: Renew all owned and used leases 2012-06-29 02:14:45 +02:00
Pawel Dziepak
6ee3ed0f6f nfs4: Add per server NFS4 objects
RPC::Server is now able to store RPC programs data.
NFS4Server objects are currently used mainly for managing client id.
2012-06-29 02:14:44 +02:00
Pawel Dziepak
96e3dbc2d0 nfs4: Let stat() retrieve access, change, etc dates 2012-06-29 02:14:44 +02:00
Pawel Dziepak
0792abe006 nfs4: Fix timeout handling code 2012-06-29 02:14:43 +02:00
Pawel Dziepak
d8a223873f nfs4: Use ACCESS if server does not provide file mode 2012-06-29 02:14:42 +02:00
Pawel Dziepak
e6e9b107de nfs4: Partial support for servers not providing FileId 2012-06-29 02:14:41 +02:00
Pawel Dziepak
5945c55ae4 nfs4: Correctly handle timeouts and other rpc errors 2012-06-29 02:14:40 +02:00
Pawel Dziepak
3ce57b347f nfs4: Make RPC calls asynchronous 2012-06-29 02:14:39 +02:00
Pawel Dziepak
01d6381d20 nfs4: Add Request class for better handling of NFS4 requests 2012-06-29 02:14:38 +02:00
Pawel Dziepak
5310ed9ee1 nfs4: Fix off-by-one bug in READDIR decoding 2012-06-29 02:14:38 +02:00
Pawel Dziepak
b0368e77c9 nfs4: Allow open() on directories 2012-06-29 02:14:37 +02:00
Pawel Dziepak
631d9e9867 nfs4: Add access() hook 2012-06-29 02:14:36 +02:00
Pawel Dziepak
a01e1e9961 nfs4: k- variants of socket functions are not really needed 2012-06-29 02:14:35 +02:00
Pawel Dziepak
60a8140ded nfs4: Add close() and free_cookie() hooks 2012-06-29 02:14:34 +02:00
Pawel Dziepak
2f2e57d035 nfs4: Add read() hook 2012-06-29 02:14:33 +02:00
Pawel Dziepak
2a292557d4 nfs4: Add open() hook 2012-06-29 02:14:33 +02:00
Pawel Dziepak
8d513ebcb5 nfs4: Fix FileInfo operator= memory leak 2012-06-29 02:14:32 +02:00
Pawel Dziepak
96b7b14a96 nfs4: Add get_vnode_name hook 2012-06-29 02:14:31 +02:00
Pawel Dziepak
87c6b83293 nfs4: Inodes should know their name and parent's filehandle 2012-06-29 02:14:30 +02:00
Pawel Dziepak
e8845bd5b7 nfs4: Add rewind_dir() hook 2012-06-29 02:14:29 +02:00
Pawel Dziepak
f29ac4afd9 nfs4: readdir() should not read more than requested
Additionally, file attribute decoding checks more strictly whether
received data are sane.
2012-06-29 02:14:28 +02:00
Pawel Dziepak
ed517d6c62 nfs4: Do not store pointer to parent in inodes 2012-06-29 02:14:27 +02:00
Pawel Dziepak
7bfa4fe805 nfs4: Add lookup() and get_vnode() hooks
get_vnode() needs a way to retrieve filehandle knowing only inode number.
Since NFS4 sever does not provide such services client manages its own mapping
between ino_t and filehandles.
2012-06-29 02:14:27 +02:00
Pawel Dziepak
aefd79e6a7 nfs4: The unary & operator is not really needed 2012-06-29 02:14:26 +02:00
Pawel Dziepak
4b48348f97 nfs4: Add read_dir() hook 2012-06-29 02:14:25 +02:00
Pawel Dziepak
821f13b077 nfs4: Add open_dir, close_dir and free_dir_cookie hooks 2012-06-29 02:14:24 +02:00
Pawel Dziepak
c1a7ba322d nfs4: Add unmount() and put_vnode() procedures 2012-06-29 02:14:23 +02:00
Pawel Dziepak
cbe0913aa0 nfs4: Fix RPC::ServerManager release bug
RPC::ServerManager did not check whether reference counter equals 0 before
destroying RPC::Server object.
2012-06-29 02:14:22 +02:00
Pawel Dziepak
212de72053 nfs4: Add basic nfs4_read_stat() procedure
Not all data are retrieved and there is a room for improvement in handling
situations when server does not provide necessary information.
2012-06-29 02:14:22 +02:00
Pawel Dziepak
d38e98d806 nfs4: Implement nfs4_mount() procedure 2012-06-29 02:14:21 +02:00
Pawel Dziepak
bf31ee39e5 nfs4: Add stub Inode class, fix and extend Filesystem class
Additionally PUTFH support is added to both RequestBuilder and
ReplyInterpreter.
2012-06-29 02:14:20 +02:00
Pawel Dziepak
45aa18ac4c nfs4: Add stub Filesystem class and Mount method 2012-06-29 02:14:19 +02:00
Pawel Dziepak
e552920f09 nfs4: Fix rpc listener thread cancelation
recv on UDP sockets is not interrupted when the socket is closed.
Additionaly, signals do not interrupt kernel threads, that is why
new function interrupt_thread was implemented in order to cancel
listener thread.
2012-06-29 02:14:18 +02:00
Pawel Dziepak
7fdee1565d nfs4: No need to cast from enum to int 2012-06-29 02:14:17 +02:00
Pawel Dziepak
196403c9ab nfs4: Add NFS4 reply interpreter
Currently supported operations are: ACCESS, GETATTR (partially), GETFH,
LOOKUP and PUTROOTFH.
2012-06-29 02:14:16 +02:00
Pawel Dziepak
d08c284cec nfs4: Add NFS4 request builder
Currently supports only the following operations: ACCESS, GETATTR, GETFH
LOOKUP and PUTROOTFH.
2012-06-29 02:14:16 +02:00
Pawel Dziepak
4aeb595207 nfs4: Add some NFS4 constants 2012-06-29 02:14:15 +02:00
Pawel Dziepak
3e945c7ff0 nfs4: Make mount() send null nfs4 call 2012-06-29 02:14:14 +02:00
Pawel Dziepak
b82f4c07eb nfs4: Make RPC::Reply decode RPC errors 2012-06-29 02:14:13 +02:00
Pawel Dziepak
5cdf02db09 nfs4: Add RPC::Server release and repair code 2012-06-29 02:14:12 +02:00
Pawel Dziepak
b35311f1ba nfs4: Add RPC main communication code
RPC::Server represents a server client is connected to.
RPC::RequestManager stores all call that have been sent but no answer was
received so far.
RPC::ServerManager is responsible for reusing connections to the servers
and closing them when no longer needed.
2012-06-29 02:14:11 +02:00
Pawel Dziepak
274145b3ea nfs4: Add ServerAddress comparators 2012-06-29 02:14:11 +02:00
Pawel Dziepak
bb7c7ca2c4 nfs4: Remove unnecessary 'Get' prefixes from accessor methods 2012-06-29 02:14:10 +02:00
Pawel Dziepak
da59bc46d9 nfs4: Add stub RPC reply code
RPC::Reply interprets incoming RPC replies. Currently only XID is
read.
2012-06-29 02:14:09 +02:00
Pawel Dziepak
313da82b9f nfs4: Add call generation code including authentication
RPC::Call generates a RPC call using provided RPC::Auth objects.
RPC::Auth supports AUTH_NONE and AUTH_SYS authentication protocols.
2012-06-29 02:14:08 +02:00
Pawel Dziepak
42b2ae1c80 nfs4: Add XDR encoder and decoder
Base classes XDR::Stream and classes XDR::WriteStream and XDR::ReadStream
are added. They implement encoding and decoding XDR (RFC 4506) streams.
All data types used by RPC and NFS4 are supported.
2012-06-29 02:14:07 +02:00
Pawel Dziepak
e4977f2046 nfs4: Add network code
Connection class supports sending and receiving RPC data using either
TCP or UDP as a transport protocol.
2012-06-29 02:14:06 +02:00