An error occurred fetching the project authors.
- 21 Oct, 2010 2 commits
-
-
J. Bruce Fields authored
Instead of copying the sessionid, use the new cl_cb_session pointer, which indicates which session we're using for the backchannel. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
The backchannel should be associated with a session, it isn't really global to the client. We do, however, want a pointer global to the client which tracks which session we're currently using for client-based callbacks. This is a first step in that direction; for now, just reshuffling of code with no significant change in behavior. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 01 Oct, 2010 8 commits
-
-
J. Bruce Fields authored
Remove connections from the list when they go down. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
The spec requires us in various places to keep track of the connections associated with each session. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Instead of creating the new rpc client from a regular server thread, set a flag, kick off a null call, and allow the null call to do the work of setting up the client on the callback workqueue. Use a spinlock to ensure the callback work gets a consistent view of the callback parameters. This allows, for example, changing the callback from contexts where sleeping is not allowed. I hope it will also keep the locking simple as we add more session and trunking features, by serializing most of the callback-specific work. This also closes a small race where the the new cb_ident could be used with an old connection (or vice-versa). Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
I don't see the point of the separate struct. It seems to just be getting in the way. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
This will eventually allow us, for example, to kick off null callback from contexts where we can't sleep. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Make the recall callback code more generic, so that other callbacks will be able to use it too. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
With apologies for the gratuitous rename, the new name seems more helpful to me. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
These two structs don't really need to be distinct as far as I can tell. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 26 Aug, 2010 2 commits
-
-
J. Bruce Fields authored
If we already had a RW open for a file, and get a readonly open, we were piggybacking on the existing RW open. That's inconsistent with the downgrade logic which blows away the RW open assuming you'll still have a readonly open. Also, make sure there is a readonly or writeonly open available for locking, again to prevent bad behavior in downgrade cases when any RW open may be lost. Signed-off-by:
J. Bruce Fields <bfields@redhat.com>
-
J. Bruce Fields authored
Signed-off-by:
J. Bruce Fields <bfields@redhat.com>
-
- 29 Jul, 2010 1 commit
-
-
J. Bruce Fields authored
The vfs doesn't really allow us to "upgrade" a file descriptor from read-only to read-write, and our attempt to do so in nfs4_upgrade_open is ugly and incomplete. Move to a different scheme where we keep multiple opens, shared between open stateid's, in the nfs4_file struct. Each file will be opened at most 3 times (for read, write, and read-write), and those opens will be shared between all clients and openers. On upgrade we will do another open if necessary instead of attempting to upgrade an existing open. We keep count of the number of readers and writers so we know when to close the shared files. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 13 May, 2010 3 commits
-
-
Benny Halevy authored
Get a refcount on the client on SEQUENCE, Release the refcount and renew the client when all respective compounds completed. Do not expire the client by the laundromat while in use. If the client was expired via another path, free it when the compounds complete and the refcount reaches 0. Note that unhash_client_locked must call list_del_init on cl_lru as it may be called twice for the same client (once from nfs4_laundromat and then from expire_client) Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Benny Halevy authored
Mark the client as expired under the client_lock so it won't be renewed when an nfsv4.1 session is done, after it was explicitly expired during processing of the compound. Do not renew a client mark as expired (in particular, it is not on the lru list anymore) Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Benny Halevy authored
Currently just initialize the cl_refcount to 1 and decrement in expire_client(), conditionally freeing the client when the refcount reaches 0. To be used later by nfsv4.1 compounds to keep the client from timing out while in use. Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 22 Apr, 2010 4 commits
-
-
J. Bruce Fields authored
The rfc allows a client to change the callback parameters, but we didn't previously implement it. Teach the callbacks to rerun themselves (by placing themselves on a workqueue) when they recognize that their rpc task has been killed and that the callback connection has changed. Then we can change the callback connection by setting up a new rpc client, modifying the nfs4 client to point at it, waiting for any work in progress to complete, and then shutting down the old client. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Mainly I just want to separate the arguments used for setting up the tcp client from the rest. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Now that the shutdown sequence guarantees callbacks are shut down before the client is destroyed, we no longer have a use for cl_count. We'll probably reinstate a reference count on the client some day, but it will be held by users other than callbacks. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
The NFSv4 server's fl_break callback can sleep (dropping the BKL), in order to allocate a new rpc task to send a recall to the client. As far as I can tell this doesn't cause any races in the current code, but the analysis is difficult. Also, the sleep here may complicate the move away from the BKL. So, just schedule some work to do the job for us instead. The work will later also prove useful for restarting a call after the callback information is changed. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 02 Apr, 2010 1 commit
-
-
J. Bruce Fields authored
Instead of allocating this small structure, just include it in the delegation. The nfsd4_callback structure isn't really necessary yet, but we plan to add to it all the information necessary to perform a callback. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 15 Dec, 2009 2 commits
-
-
J. Bruce Fields authored
The new .h files have paths at the top that are now out of date. While we're here, just remove all of those from fs/nfsd; they never served any purpose. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Most of this can be trivially moved to a private header as well. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 14 Dec, 2009 2 commits
-
-
Boaz Harrosh authored
Lots of include/linux/nfsd/* headers are only used by nfsd module. Move them to the source directory Signed-off-by:
Boaz Harrosh <bharrosh@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Boaz Harrosh authored
* Add includes that are directly used by headers * Remove includes that are not needed These are the changes made: [xdr.h] struct nfsd_readdirres has an embedded struct readdir_cd from nfsd.h fixing that we can drop other includes [xdr4.h] embedded types defined both at state.h and nfsd.h [syscall.h] After export.h fix none of these stuff is needed. fix extra space in # include <> statement [stats.h] does not need <linux/nfs4.h> but was export to user-mode so I don't touch it [state.h] embedded types from nfsfh.h like struct knfsd_fh. bringing that eliminates the need for all other includes [nfsfh.h] directly manipulating types from sunrpc/svc.h. Removed Other unused headers. [nfsd.h] removed unused headers include [export.h] lots of sunrpc/svc.h types and a single prototype declaration with pointer from nfsfh.h, but all users of export.h do need nfsfh.h any way. remove now un-needed include. [const.h] Unfixed (not independent) [cache.h] could do with a forward declaration of "struct svc_rqst;" from sunrpc/svc.h but all users absolutely will need sunrpc/svc.h it is easier overall this way. Signed-off-by:
Boaz Harrosh <bharrosh@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 05 Nov, 2009 1 commit
-
-
Benny Halevy authored
Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 16 Sep, 2009 5 commits
-
-
Ricardo Labiaga authored
Follows the model used by the NFS client. Setup the RPC prepare and done function pointers so that we can populate the sequence information if minorversion == 1. rpc_run_task() is then invoked directly just like existing NFS client operations do. nfsd4_cb_prepare() determines if the sequence information needs to be setup. If the slot is in use, it adds itself to the wait queue. nfsd4_cb_done() wakes anyone sleeping on the callback channel wait queue after our RPC reply has been received. It also sets the task message result pointer to NULL to clearly indicate we're done using it. Signed-off-by:
Ricardo Labiaga <Ricardo.Labiaga@netapp.com> [define and initialize cl_cb_seq_nr here] [pulled out unused defintion of nfsd4_cb_done] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Ricardo Labiaga authored
RPC callback requests will wait on this wait queue if the backchannel is out of slots. Signed-off-by:
Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Ricardo Labiaga authored
Follow the model we use in the client. Make the sequence arguments part of the regular RPC arguments. None of the callbacks that are soon to be implemented expect results that need to be passed back to the caller, so we don't define a separate RPC results structure. For session validation, the cb_sequence decoding will use a pointer to the sequence arguments that are part of the RPC argument. Signed-off-by:
Ricardo Labiaga <Ricardo.Labiaga@netapp.com> [define struct nfsd4_cb_sequence here] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Andy Adamson authored
Keep the xprt used for create_session in cl_cb_xprt. Mark cl_callback.cb_minorversion = 1 and remember the client provided cl_callback.cb_prog rpc program number. Use it to probe the callback path. Use the client's network address to initialize as the callback's address as expected by the xprt creation routines. Define xdr sizes and code nfs4_cb_compound header to be able to send a null callback rpc. Signed-off-by: Andy Adamson<andros@netapp.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
Ricardo Labiaga <Ricardo.Labiaga@netapp.com> [get callback minorversion from fore channel's] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> [nfsd41: change bc_sock to bc_xprt] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> [pulled definition for cl_cb_xprt] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> [nfsd41: set up backchannel's cb_addr] [moved rpc_create_args init to "nfsd: modify nfsd4.1 backchannel to use new xprt class"] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
J. Bruce Fields authored
Callbacks are always made using the machine's identity, so we can use a single auth_generic credential shared among callbacks to all clients and let the rpc code take care of the rest. Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 02 Sep, 2009 2 commits
-
-
Andy Adamson authored
Use NFSD_SLOT_CACHE_SIZE size buffers for sessions DRC instead of holding nfsd pages in cache. Connectathon testing has shown that 1024 bytes for encoded compound operation responses past the sequence operation is sufficient, 512 bytes is a little too small. Set NFSD_SLOT_CACHE_SIZE to 1024. Allocate memory for the session DRC in the CREATE_SESSION operation to guarantee that the memory resource is available for caching responses. Allocate each slot individually in preparation for slot table size negotiation. Remove struct nfsd4_cache_entry and helper functions for the old page-based DRC. The iov_len calculation in nfs4svc_encode_compoundres is now always correct. Replay is now done in nfsd4_sequence under the state lock, so the session ref count is only bumped on non-replay. Clean up the nfs4svc_encode_compoundres session logic. The nfsd4_compound_state statp pointer is also not used. Remove nfsd4_set_statp(). Move useful nfsd4_cache_entry fields into nfsd4_slot. Signed-off-by: Andy Adamson <andros@netapp.com Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Andy Adamson authored
By using the requested ca_maxresponsesize_cached * ca_maxresponses to bound a forechannel drc request size, clients can tailor a session to usage. For example, an I/O session (READ/WRITE only) can have a much smaller ca_maxresponsesize_cached (for only WRITE compound responses) and a lot larger ca_maxresponses to service a large in-flight data window. Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 21 Aug, 2009 2 commits
-
-
Jeff Layton authored
...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>
-
Jeff Layton authored
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>
-
- 28 Jul, 2009 2 commits
-
-
Andy Adamson authored
Instead of trying to share the generic 4.1 reply cache code for the CREATE_SESSION reply cache, it's simpler to handle CREATE_SESSION separately. The nfs41 single slot clientid DRC holds the results of create session processing. CREATE_SESSION can be preceeded by a SEQUENCE operation (an embedded CREATE_SESSION) and the create session single slot cache must be maintained. nfsd4_replay_cache_entry() and nfsd4_store_cache_entry() do not implement the replay of an embedded CREATE_SESSION. The clientid DRC slot does not need the inuse, cachethis or other fields that the multiple slot session cache uses. Replace the clientid DRC cache struct nfs4_slot cache with a new nfsd4_clid_slot cache. Save the xdr struct nfsd4_create_session into the cache at the end of processing, and on a replay, replace the struct for the replay request with the cached version all while under the state lock. nfsd4_proc_compound will handle both the solo and embedded CREATE_SESSION case via the normal use of encode_operation. Errors that do not change the create session cache: A create session NFS4ERR_STALE_CLIENTID error means that a client record (and associated create session slot) could not be found and therefore can't be changed. NFSERR_SEQ_MISORDERED errors do not change the slot cache. All other errors get cached. Remove the clientid DRC specific check in nfs4svc_encode_compoundres to put the session only if cstate.session is set which will now always be true. Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
Andy Adamson authored
NFSD_SLOT_CACHE_SIZE is the size of all encoded operation responses (excluding the sequence operation) that we want to cache. For now, keep NFSD_SLOT_CACHE_SIZE at PAGE_SIZE. It will be reduced when the DRC is changed from page based to memory based. Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 19 Jun, 2009 1 commit
-
-
Andy Adamson authored
Prepare to share backchannel code with NFSv4.1. Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
Ricardo Labiaga <Ricardo.Labiaga@netapp.com> [nfsd41: use nfsd4_cb_sequence for callback minorversion] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-
- 17 Jun, 2009 1 commit
-
-
Benny Halevy authored
Implement the exchange_id operation conforming to http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-26 Unlike NFSv4.0, NFSv4.1 requires machine credentials. RPC_AUTH_GSS machine credentials will be passed into the kernel at mount time to be available for the exchange_id operation. RPC_AUTH_UNIX root mounts can use the UNIX root credential. Store the root credential in the nfs_client struct. Without a credential, NFSv4.1 state renewal fails. [nfs41: establish clientid via exchange id only if cred != NULL] Signed-off-by: Andy Adamson<andros@umich.edu> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> [nfsd41: move nfstime4 from under CONFIG_NFS_V4_1] Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> [nfs41: do not wait a lease time in exchange id] Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> [nfs41: pass *session in seq_args and seq_res] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com> [nfs41: Ignoring impid in decode_exchange_id is missing a READ_BUF] Signed-off-by:
Benny Halevy <bhalevy@panasas.com> [nfs41: fix Xcode_exchange_id's xdr Xcoding pointer type] [nfs41: get rid of unused struct nfs41_exchange_id_res members] Signed-off-by:
Benny Halevy <bhalevy@panasas.com>
-
- 16 Jun, 2009 1 commit
-
-
Alexandros Batsakis authored
the change is valid for both the forechannel and the backchannel (currently dummy) Signed-off-by:
Alexandros Batsakis <Alexandros.Batsakis@netapp.com> Signed-off-by:
Benny Halevy <bhalevy@panasas.com> Signed-off-by:
J. Bruce Fields <bfields@citi.umich.edu>
-