aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-31nfsd4: exchange_id cleanup: commentsJ. Bruce Fields1-26/+10
Make these comments a bit more concise and uniform. Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: exchange_id cleanup: local shorthands for repeated testsJ. Bruce Fields1-6/+10
Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: allow an EXCHANGE_ID to kill a 4.0 clientJ. Bruce Fields1-2/+8
Following rfc 5661 section 2.4.1, we can permit a 4.1 client to remove an established 4.0 client's state. (But we don't allow updates.) Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: exchange_id: check creds before killing confirmed clientJ. Bruce Fields1-9/+8
We mustn't allow a client to destroy another client with established state unless it has the right credential. And some minor cleanup. (Note: our comparison of credentials is actually pretty bogus currently; that will need to be fixed in another patch.) Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: exchange_id error cleanupJ. Bruce Fields1-5/+1
There's no point to the dprintk here as the main proc_compound loop already does this. Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: exchange_id has a pointless copyJ. Bruce Fields1-1/+0
We just verified above that these two verifiers are already the same. Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31svcrpc: fix a comment typoJ. Bruce Fields1-1/+1
Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd: return 0 on reads of fault injection filesWeston Andros Adamson1-0/+1
debugfs read operations were returning the contents of an uninitialized u64. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd: wrap all accesses to st_deny_bmapJeff Layton1-8/+29
Handle the st_deny_bmap in a similar fashion to the st_access_bmap. Add accessor functions and use those instead of bare bitops. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd: wrap accesses to st_access_bmapJeff Layton1-28/+54
Currently, we do this for the most part with "bare" bitops, but eventually we'll need to expand the share mode code to handle access and deny modes on other nodes. In order to facilitate that code in the future, move to some generic accessor functions. For now, these are mostly static inlines, but eventually we'll want to move these to "real" functions that are able to handle multi-node configurations or have a way to "swap in" new operations to be done in lieu of or in conjunction with these atomic bitops. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd: make test_share a bool returnJeff Layton1-3/+3
All of the callers treat the return that way already. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd: consolidate set_access and set_denyJeff Layton1-17/+7
These functions are identical. Also, rename them to bmap_to_share_mode to better reflect what they do, and have them just return the result instead of passing in a pointer to the storage location. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31NFSD: SETCLIENTID_CONFIRM returns NFS4ERR_CLID_INUSE too oftenChuck Lever1-12/+2
According to RFC 3530bis, the only items SETCLIENTID_CONFIRM processing should be concerned with is the clientid, clientid verifier, and principal. The client's IP address is not supposed to be interesting. And, NFS4ERR_CLID_INUSE is meant only for principal mismatches. I triggered this logic with a prototype UCS client -- one that uses the same nfs_client_id4 string for all servers. The client mounted our server via its IPv4, then via its IPv6 address. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31LockD: add debug message to start and stop functionsStanislav Kinsbursky1-0/+5
Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31LockD: service start function introducedStanislav Kinsbursky1-25/+42
This is just a code move, which from my POV makes the code look better. I.e. now on start we have 3 different stages: 1) Service creation. 2) Service per-net data allocation. 3) Service start. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31LockD: move global usage counter manipulation from error pathStanislav Kinsbursky1-3/+2
Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31LockD: service creation function introducedStanislav Kinsbursky1-11/+27
This function creates service if it doesn't exist, or increases usage counter if it does, and returns a pointer to it. The usage counter will be droppepd by svc_destroy() later in lockd_up(). Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31LockD: use existing per-net data function on service creationStanislav Kinsbursky1-16/+7
This patch also replaces svc_rpcb_setup() with svc_bind(). Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31LockD: pass service to per-net up and down functionsStanislav Kinsbursky1-7/+5
Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31sunrpc: do array overrun check in svc_recv before allocating pagesJeff Layton1-1/+1
There's little point in waiting until after we allocate all of the pages to see if we're going to overrun the array. In the event that this calculation is really off we could end up scribbling over a bunch of memory and make it tougher to debug. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31SUNRPC: move per-net operations from svc_destroy()Stanislav Kinsbursky5-19/+41
The idea is to separate service destruction and per-net operations, because these are two different things and the mix looks ugly. Notes: 1) For NFS server this patch looks ugly (sorry for that). But these place will be rewritten soon during NFSd containerization. 2) LockD per-net counter increase int lockd_up() was moved prior to make_socks() to make lockd_down_net() call safe in case of error. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31SUNRPC: new svc_bind() routine introducedStanislav Kinsbursky6-14/+41
This new routine is responsible for service registration in a specified network context. The idea is to separate service creation from per-net operations. Note also: since registering service with svc_bind() can fail, the service will be destroyed and during destruction it will try to unregister itself from rpcbind. In this case unregistration has to be skipped. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31rpc: handle rotated gss data for Windows interoperabilityJ. Bruce Fields1-16/+45
The data in Kerberos gss tokens can be rotated. But we were lazy and rejected any nonzero rotation value. It wasn't necessary for the implementations we were testing against at the time. But it appears that Windows does use a nonzero value here. So, implement rotation to bring ourselves into compliance with the spec and to interoperate with Windows. Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd: add IPv6 addr escaping to fs_location hostsWeston Andros Adamson1-7/+33
The fs_location->hosts list is split on colons, but this doesn't work when IPv6 addresses are used (they contain colons). This patch adds the function nfsd4_encode_components_esc() to allow the caller to specify escape characters when splitting on 'sep'. In order to fix referrals, this patch must be used with the mountd patch that similarly fixes IPv6 [] escaping. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: fix change attribute endiannessJ. Bruce Fields1-2/+2
Though actually this doesn't matter much, as NFSv4.0 clients are required to treat the change attribute as opaque. Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: fix free_stateid return endiannessJ. Bruce Fields1-2/+2
Cc: Bryan Schumaker <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: int/__be32 fixesJ. Bruce Fields3-20/+20
In each of these cases there's a simple unambiguous correct choice, and no actual bug. Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: preserve __user annotation on cld downcall msgJ. Bruce Fields1-1/+1
Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd4: fix missing "static"J. Bruce Fields4-4/+4
Signed-off-by: J. Bruce Fields <[email protected]>
2012-05-31nfsd: state.c should include current_stateid.hJ. Bruce Fields1-0/+1
OK, admittedly I'm mainly just trying to shut sparse up. Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-25nfsd: trivial: use SEEK_SET instead of 0 in vfs_llseekJeff Layton1-1/+1
They're equivalent, but SEEK_SET is more informative... Cc: Eric Sandeen <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-25SUNRPC: split upcall function to extract reusable partsSimo Sorce1-36/+64
This is needed to share code between the current server upcall mechanism and the new gssproxy upcall mechanism introduced in a following patch. Signed-off-by: Simo Sorce <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: allocate id-to-name and name-to-id caches in per-net operations.Stanislav Kinsbursky1-7/+7
Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: make name-to-id cache allocated per network namespace contextStanislav Kinsbursky2-10/+16
Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: make id-to-name cache allocated per network namespace contextStanislav Kinsbursky2-10/+26
Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: pass network context to idmap init/exit functionsStanislav Kinsbursky3-14/+14
These functions will be called from per-net operations. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: allocate export and expkey caches in per-net operations.Stanislav Kinsbursky1-6/+21
Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: make expkey cache allocated per network namespace contextStanislav Kinsbursky6-24/+25
This patch also changes svcauth_unix_purge() function: added network namespace as a parameter and thus loop over all networks was replaced by only one call for ip map cache purge. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: make export cache allocated per network namespace contextStanislav Kinsbursky5-19/+38
This patch also changes prototypes of nfsd_export_flush() and exp_rootfh(): network namespace parameter added. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-12nfsd: pass pointer to export cache down to stack wherever possible.Stanislav Kinsbursky1-15/+22
This cache will be per-net soon. And it's easier to get the pointer to desired per-net instance only once and then pass it down instead of discovering it in every place were required. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: pass network context to export caches init/shutdown routinesStanislav Kinsbursky3-15/+15
These functions will be called from per-net operations. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11Lockd: pass network namespace to creation and destruction routinesStanislav Kinsbursky4-14/+16
v2: dereference of most probably already released nlm_host removed in nlmclnt_done() and reclaimer(). These routines are called from locks reclaimer() kernel thread. This thread works in "init_net" network context and currently relays on persence on lockd thread and it's per-net resources. Thus lockd_up() and lockd_down() can't relay on current network context. So let's pass corrent one into them. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11NFSd: remove hard-coded dereferences to name-to-id and id-to-name cachesStanislav Kinsbursky1-26/+24
These dereferences to global static caches are redundant. They also prevents converting these caches into per-net ones. So this patch is cleanup + precursor of patch set,a which will make them per-net. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: pass pointer to expkey cache down to stack wherever possible.Stanislav Kinsbursky1-16/+16
This cache will be per-net soon. And it's easier to get the pointer to desired per-net instance only once and then pass it down instead of discovering it in every place were required. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: use hash table from cache detail in nfsd export seq opsStanislav Kinsbursky1-0/+3
Hard-code is redundant and will prevent from making caches per net ns. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: pass svc_export_cache pointer as private data to "exports" seq file opsStanislav Kinsbursky2-8/+21
Global svc_export_cache cache is going to be replaced with per-net instance. So prepare the ground for it. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: use exp_put() for svc_export_cache putStanislav Kinsbursky2-2/+2
This patch replaces cache_put() call for svc_export_cache by exp_put() call. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: use cache detail pointer from svc_export structure on cache putStanislav Kinsbursky1-1/+1
Hard-coded pointer is redundant now and can be replaced. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: add link to owner cache detail to svc_export structureStanislav Kinsbursky2-5/+6
Without info about owner cache datail it won't be able to find out, which per-net cache detail have to be. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2012-04-11nfsd: use passed cache_detail pointer expkey_parse()Stanislav Kinsbursky1-1/+1
Using of hard-coded svc_expkey_cache pointer in expkey_parse() looks redundant. Moreover, global cache will be replaced with per-net instance soon. Signed-off-by: Stanislav Kinsbursky <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>