Jeff Layton
aa9a4ec770
nfsd: convert nfs4_cb_conn struct to hold address in sockaddr_storage
...
...rather than as a separate address and port fields. This will be
necessary for implementing callbacks over IPv6. Also, convert
gen_callback to use the standard rpcuaddr2sockaddr routine rather than
its own private one.
Signed-off-by: Jeff Layton <jlayton@redhat.com >
Acked-by: Chuck Lever <chuck.lever@oracle.com >
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu >
2009-08-21 11:27:43 -04:00
Jeff Layton
363168b4ea
nfsd: make nfs4_client->cl_addr a struct sockaddr_storage
...
It's currently a __be32, which isn't big enough to hold an IPv6 address.
Signed-off-by: Jeff Layton <jlayton@redhat.com >
Acked-by: Chuck Lever <chuck.lever@oracle.com >
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu >
2009-08-21 11:27:43 -04:00
Jeff Layton
be3ad6b0b6
sunrpc: add common routine for copying address portion of a sockaddr
...
Signed-off-by: Jeff Layton <jlayton@redhat.com >
Acked-by: Chuck Lever <chuck.lever@oracle.com >
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu >
2009-08-21 11:27:43 -04:00
Jeff Layton
4516fc0454
sunrpc: add routine for comparing addresses
...
lockd needs these sort of routines, as does the NFSv4 callback code.
Move lockd's routines into common code and rename them so that they can
be used by others.
Signed-off-by: Jeff Layton <jlayton@redhat.com >
Acked-by: Chuck Lever <chuck.lever@oracle.com >
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu >
2009-08-21 11:27:42 -04:00
J. Bruce Fields
e9dc122166
Merge branch 'nfs-for-2.6.32' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 into for-2.6.32-incoming
...
Conflicts:
net/sunrpc/cache.c
2009-08-21 11:27:29 -04:00
Trond Myklebust
405d8f8b1d
SUNRPC: Ensure that sunrpc gets initialised before nfs, lockd, etc...
...
We can oops if rpc_pipefs isn't properly initialised before we start to set
up objects that depend upon it.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-21 08:17:56 -04:00
J. Bruce Fields
4dceef9675
nfs: fix compile error in rpc_pipefs.h
...
This include is needed for the definition of delayed_work.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-20 18:20:25 -04:00
Jan Kara
e1af88a1ad
nfs: Remove reference to generic_osync_inode from a comment
...
generic_file_direct_write() no longer calls generic_osync_inode() so remove the
comment.
CC: linux-nfs@vger.kernel.org
CC: Neil Brown <neilb@suse.de >
CC: "J. Bruce Fields" <bfields@fieldses.org >
Signed-off-by: Jan Kara <jack@suse.cz >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-19 19:48:08 -04:00
Trond Myklebust
f7e86ab92f
SUNRPC: cache must take a reference to the cache detail's module on open()
...
Otherwise we Oops if the module containing the cache detail is removed
before all cache readers have closed the file.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-19 18:22:16 -04:00
Trond Myklebust
7d7ea88289
NFS: Use the DNS resolver in the mount code.
...
In the referral code, use it to look up the new server's ip address if the
fs_locations attribute contains a hostname.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-19 18:22:15 -04:00
Trond Myklebust
e571cbf1a4
NFS: Add a dns resolver for use with NFSv4 referrals and migration
...
The NFSv4 and NFSv4.1 protocols both allow for the redirection of a client
from one server to another in order to support filesystem migration and
replication. For full protocol support, we need to add the ability to
convert a DNS host name into an IP address that we can feed to the RPC
client.
We'll reuse the sunrpc cache, now that it has been converted to work with
rpc_pipefs.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-19 18:22:15 -04:00
Trond Myklebust
96c61cbd0f
SUNRPC: Fix a typo in cache_pipefs_files
...
We want the channel to be a regular file, so that we don't need to supply
rpc_pipe_ops.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-19 18:22:15 -04:00
Trond Myklebust
6a396f67d2
Merge branch 'nfsv4_xdr_cleanups-for-2.6.32' into nfs-for-2.6.32
...
Conflicts:
fs/nfs/nfs4xdr.c
2009-08-19 18:21:52 -04:00
Benny Halevy
cccddf4f55
nfs: nfs4xdr: optimize low level decoding
...
do not increment decoding ptr if not needed.
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 14:02:26 -04:00
Benny Halevy
c0eae66ece
nfs: nfs4xdr: get rid of READ_BUF
...
Use xdr_inline_decode instead.
Open code debug printout and error return.
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 14:02:23 -04:00
Benny Halevy
2460ba57c4
nfs: nfs4xdr: simplify decode_exchange_id by reusing decode_opaque_inline
...
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 14:02:20 -04:00
Benny Halevy
99398d0655
nfs: nfs4xdr: get rid of COPYMEM
...
Just directly call memcpy.
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 14:02:17 -04:00
Benny Halevy
e78291e4e0
nfs: nfs4xdr: introduce decode_sessionid helper
...
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 14:02:14 -04:00
Benny Halevy
db942bbd09
nfs: nfs4xdr: introduce decode_verifier helper
...
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
[Trond: Fixed up an 'uninitialised variable' issue in decode_readdir]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 13:57:58 -04:00
Benny Halevy
07d30434cf
nfs: nfs4xdr: introduce decode_opaque_fixed and decode_stateid helpers
...
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 13:26:27 -04:00
Benny Halevy
686841b3cc
nfs: nfs4xdr: introduce print_overflow_msg
...
Part fo the nfs4xdr cleanup. READ_BUF will go away.
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 13:24:38 -04:00
Benny Halevy
c816fd3406
nfs: nfs4xdr: get rid of READTIME
...
It has no users.
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 13:24:32 -04:00
Benny Halevy
3ceb4dbb99
nfs: nfs4xdr: get rid of READ64
...
s/READ64\(\*(.*)\)/p = xdr_decode_hyper(p, \1)/
s/READ64\((.*)\)/p = xdr_decode_hyper(p, &\1)/
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 13:24:13 -04:00
Benny Halevy
6f723f7710
nfs: nfs4xdr: get rid of READ32
...
s/READ32\((.*)\)/\1 = be32_to_cpup(p++)/
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 13:23:58 -04:00
Benny Halevy
811652bd6e
nfs: nfs4xdr: merge xdr_encode_int+xdr_encode_opaque_fixed into xdr_encode_opaque
...
use encode_string where appropriate.
Signed-off-by: Benny Halevy <bhalevy@panasas.com >
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com >
2009-08-14 13:19:24 -04:00