summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ARM: OMAP2+: Trivial fix for IOMMU merge issueTony Lindgren2012-12-201-2/+2
| | | | | | | | | | | | | | | | | | | Commit 787314c35fbb ("Merge tag 'iommu-updates-v3.8' of git://git./linux/kernel/git/joro/iommu") did not account for the changed header location. The headers were made local to mach-omap2 as they are specific to omap2+ only, and we wanted to get most of the #include <plat/*.h> headers fixed up anyways for the ARM multiplatform support. We attempted to avoid this kind of merge conflict early on by setting up a minimal git branch shared by the arm-soc tree and the iommu tree, but looks like we still hit a merge issue there as the branches got merged as various topic branches. Cc: Joerg Roedel <joro@8bytes.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-3.8' of git://linux-nfs.org/~bfields/linuxLinus Torvalds2012-12-2032-1067/+1911
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull nfsd update from Bruce Fields: "Included this time: - more nfsd containerization work from Stanislav Kinsbursky: we're not quite there yet, but should be by 3.9. - NFSv4.1 progress: implementation of basic backchannel security negotiation and the mandatory BACKCHANNEL_CTL operation. See http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues for remaining TODO's - Fixes for some bugs that could be triggered by unusual compounds. Our xdr code wasn't designed with v4 compounds in mind, and it shows. A more thorough rewrite is still a todo. - If you've ever seen "RPC: multiple fragments per record not supported" logged while using some sort of odd userland NFS client, that should now be fixed. - Further work from Jeff Layton on our mechanism for storing information about NFSv4 clients across reboots. - Further work from Bryan Schumaker on his fault-injection mechanism (which allows us to discard selective NFSv4 state, to excercise rarely-taken recovery code paths in the client.) - The usual mix of miscellaneous bugs and cleanup. Thanks to everyone who tested or contributed this cycle." * 'for-3.8' of git://linux-nfs.org/~bfields/linux: (111 commits) nfsd4: don't leave freed stateid hashed nfsd4: free_stateid can use the current stateid nfsd4: cleanup: replace rq_resused count by rq_next_page pointer nfsd: warn on odd reply state in nfsd_vfs_read nfsd4: fix oops on unusual readlike compound nfsd4: disable zero-copy on non-final read ops svcrpc: fix some printks NFSD: Correct the size calculation in fault_inject_write NFSD: Pass correct buffer size to rpc_ntop nfsd: pass proper net to nfsd_destroy() from NFSd kthreads nfsd: simplify service shutdown nfsd: replace boolean nfsd_up flag by users counter nfsd: simplify NFSv4 state init and shutdown nfsd: introduce helpers for generic resources init and shutdown nfsd: make NFSd service structure allocated per net nfsd: make NFSd service boot time per-net nfsd: per-net NFSd up flag introduced nfsd: move per-net startup code to separated function nfsd: pass net to __write_ports() and down nfsd: pass net to nfsd_set_nrthreads() ...
| * nfsd4: don't leave freed stateid hashedJ. Bruce Fields2012-12-171-0/+1
| | | | | | | | | | | | | | Note the stateid is hashed early on in init_stid(), but isn't currently being unhashed on error paths. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd4: free_stateid can use the current stateidJ. Bruce Fields2012-12-171-0/+1
| | | | | | | | | | Cc: Tigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd4: cleanup: replace rq_resused count by rq_next_page pointerJ. Bruce Fields2012-12-1712-59/+61
| | | | | | | | | | | | | | It may be a matter of personal taste, but I find this makes the code clearer. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: warn on odd reply state in nfsd_vfs_readJ. Bruce Fields2012-12-171-0/+1
| | | | | | | | | | | | | | As far as I can tell this shouldn't currently happen--or if it does, something is wrong and data is going to be corrupted. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd4: fix oops on unusual readlike compoundJ. Bruce Fields2012-12-171-1/+10
| | | | | | | | | | | | | | | | If the argument and reply together exceed the maximum payload size, then a reply with a read-like operation can overlow the rq_pages array. Cc: stable@kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd4: disable zero-copy on non-final read opsJ. Bruce Fields2012-12-173-8/+19
| | | | | | | | | | | | | | To ensure ordering of read data with any following operations, turn off zero copy if the read is not the final operation in the compound. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * svcrpc: fix some printksJ. Bruce Fields2012-12-171-4/+4
| | | | | | | | | | Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Correct the size calculation in fault_inject_writeBryan Schumaker2012-12-101-1/+1
| | | | | | | | | | | | | | | | If len == 0 we end up with size = (0 - 1), which could cause bad things to happen in copy_from_user(). Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Pass correct buffer size to rpc_ntopBryan Schumaker2012-12-102-3/+3
| | | | | | | | | | | | | | | | I honestly have no idea where I got 129 from, but it's a much bigger value than the actual buffer size (INET6_ADDRSTRLEN). Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: pass proper net to nfsd_destroy() from NFSd kthreadsStanislav Kinsbursky2012-12-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | Since NFSd service is per-net now, we have to pass proper network context in nfsd_shutdown() from NFSd kthreads. The simplest way I found is to get proper net from one of transports with permanent sockets. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: simplify service shutdownStanislav Kinsbursky2012-12-101-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | Function nfsd_shutdown is called from two places: nfsd_last_thread (when last kernel thread is exiting) and nfsd_svc (in case of kthreads starting error). When calling from nfsd_svc(), we can be sure that per-net resources are allocated, so we don't need to check per-net nfsd_net_up boolean flag. This allows us to remove nfsd_shutdown function at all and move check for per-net nfsd_net_up boolean flag to nfsd_last_thread. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: replace boolean nfsd_up flag by users counterStanislav Kinsbursky2012-12-101-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Since we have generic NFSd resurces, we have to introduce some way how to allocate and destroy those resources on first per-net NFSd start and on last per-net NFSd stop respectively. This patch replaces global boolean nfsd_up flag (which is unused now) by users counter and use it to determine either we need to allocate generic resources or destroy them. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: simplify NFSv4 state init and shutdownStanislav Kinsbursky2012-12-101-29/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves nfsd_startup_generic() and nfsd_shutdown_generic() calls to nfsd_startup_net() and nfsd_shutdown_net() respectively, which allows us to call nfsd_startup_net() instead of nfsd_startup() and makes the code look clearer. It also modifies nfsd_svc() and nfsd_shutdown() to check nn->nfsd_net_up instead of global nfsd_up. The latter is now used only for generic resources shutdown and is currently useless. It will replaced by NFSd users counter later in this series. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: introduce helpers for generic resources init and shutdownStanislav Kinsbursky2012-12-101-16/+34
| | | | | | | | | | | | | | | | | | | | NFSd have per-net resources and resources, used globally. Let's move generic resources init and shutdown to separated functions since they are going to be allocated on first NFSd service start and destroyed after last NFSd service shutdown. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: make NFSd service structure allocated per netStanislav Kinsbursky2012-12-105-78/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes main step in NFSd containerisation. There could be different approaches to how to make NFSd able to handle incoming RPC request from different network namespaces. The two main options are: 1) Share NFSd kthreads betwween all network namespaces. 2) Create separated pool of threads for each namespace. While first approach looks more flexible, second one is simpler and non-racy. This patch implements the second option. To make it possible to allocate separate pools of threads, we have to make it possible to allocate separate NFSd service structures per net. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: make NFSd service boot time per-netStanislav Kinsbursky2012-12-105-16/+23
| | | | | | | | | | | | | | | | | | This is simple: an NFSd service can be started at different times in different network environments. So, its "boot time" has to be assigned per net. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: per-net NFSd up flag introducedStanislav Kinsbursky2012-12-102-0/+14
| | | | | | | | | | | | | | | | | | This patch introduces introduces per-net "nfsd_net_up" boolean flag, which has the same purpose as general "nfsd_up" flag - skip init or shutdown of per-net resources in case of they are inited on shutted down respectively. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: move per-net startup code to separated functionStanislav Kinsbursky2012-12-101-15/+33
| | | | | | | | | | | | | | | | | | | | NFSd resources are partially per-net and partially globally used. This patch splits resources init and shutdown and moves per-net code to separated functions. Generic and per-net init and shutdown are called sequentially for a while. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: pass net to __write_ports() and downStanislav Kinsbursky2012-12-101-8/+8
| | | | | | | | | | | | | | | | Precursor patch. Hard-coded "init_net" will be replaced by proper one in future. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: pass net to nfsd_set_nrthreads()Stanislav Kinsbursky2012-12-103-4/+4
| | | | | | | | | | | | | | | | Precursor patch. Hard-coded "init_net" will be replaced by proper one in future. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: pass net to nfsd_svc()Stanislav Kinsbursky2012-12-103-4/+5
| | | | | | | | | | | | | | | | Precursor patch. Hard-coded "init_net" will be replaced by proper one in future. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: pass net to nfsd_create_serv()Stanislav Kinsbursky2012-12-103-6/+5
| | | | | | | | | | | | | | | | Precursor patch. Hard-coded "init_net" will be replaced by proper one in future. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: pass net to nfsd_startup() and nfsd_shutdown()Stanislav Kinsbursky2012-12-101-9/+6
| | | | | | | | | | | | | | | | Precursor patch. Hard-coded "init_net" will be replaced by proper one in future. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: pass net to nfsd_init_socks()Stanislav Kinsbursky2012-12-101-4/+4
| | | | | | | | | | | | | | | | Precursor patch. Hard-coded "init_net" will be replaced by proper one in future. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: use "init_net" for portmapperStanislav Kinsbursky2012-12-101-2/+1
| | | | | | | | | | | | | | | | | | | | There could be a situation, when NFSd was started in one network namespace, but stopped in another one. This will trigger kernel panic, because RPCBIND client is stored on per-net NFSd data, and will be NULL on NFSd shutdown. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: avoid permission checks on EXCLUSIVE_CREATE replayNeil Brown2012-12-102-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With NFSv4, if we create a file then open it we explicit avoid checking the permissions on the file during the open because the fact that we created it ensures we should be allow to open it (the create and the open should appear to be a single operation). However if the reply to an EXCLUSIVE create gets lots and the client resends the create, the current code will perform the permission check - because it doesn't realise that it did the open already.. This patch should fix this. Note that I haven't actually seen this cause a problem. I was just looking at the code trying to figure out a different EXCLUSIVE open related issue, and this looked wrong. (Fix confirmed with pynfs 4.0 test OPEN4--bfields) Cc: stable@kernel.org Signed-off-by: NeilBrown <neilb@suse.de> [bfields: use OWNER_OVERRIDE and update for 4.1] Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * SUNRPC: remove redundant "linux/nsproxy.h" includesStanislav Kinsbursky2012-12-102-2/+0
| | | | | | | | | | | | | | This is a cleanup patch. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: make NFSv4 recovery client tracking options per netStanislav Kinsbursky2012-12-102-20/+30
| | | | | | | | | | | | | | | | | | Pointer to client tracking operations - client_tracking_ops - have to be containerized, because different environment can support different trackers (for example, legacy tracker currently is not suported in container). Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd4: lockt, release_lockowner should renew clientsJ. Bruce Fields2012-12-041-18/+23
| | | | | | | | | | | | | | | | | | | | Fix nfsd4_lockt and release_lockowner to lookup the referenced client, so that it can renew it, or correctly return "expired", as appropriate. Also share some code while we're here. Reported-by: Frank Filz <ffilzlnx@us.ibm.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * svcrpc: support multiple-fragment rpc'sJ. Bruce Fields2012-12-041-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over TCP, RPC's are preceded by a single 4-byte field telling you how long the rpc is (in bytes). The spec also allows you to send an RPC in multiple such records (the high bit of the length field is used to tell you whether this is the final record). We've survived for years without supporting this because in practice the clients we care about don't use it. But the userland rpc libraries do, and every now and then an experimental client will run into this. (Most recently I noticed it while trying to write a pynfs check.) And we're really on the wrong side of the spec here--let's fix this. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * svcrpc: track rpc data length separately from sk_tcplenJ. Bruce Fields2012-12-042-9/+21
| | | | | | | | | | | | | | | | | | | | | | Keep a separate field, sk_datalen, that tracks only the data contained in a fragment, not including the fragment header. For now, this is always just max(0, sk_tcplen - 4), but after we allow multiple fragments sk_datalen will accumulate the total rpc data size while sk_tcplen only tracks progress receiving the current fragment. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * svcrpc: fix off-by-4 error in "incomplete TCP record" dprintkJ. Bruce Fields2012-12-041-1/+2
| | | | | | | | | | | | | | The full reclen doesn't include the fragment header, but sk_tcplen does. Fix this to make it an apples-to-apples comparison. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * svcrpc: delay minimum-rpc-size check till laterJ. Bruce Fields2012-12-041-9/+7
| | | | | | | | | | | | | | | | | | | | Soon we want to support multiple fragments, in which case it may be legal for a single fragment to be smaller than 8 bytes, so we'll want to delay this check till we've reached the last fragment. Also fix an outdated comment. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * svcrpc: don't byte-swap sk_reclen in placeJ. Bruce Fields2012-12-042-16/+22
| | | | | | | | | | | | | | | | | | Byte-swapping in place is always a little dubious. Let's instead define this field to always be big-endian, and do the swapping on demand where we need it. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Forget state for a specific clientBryan Schumaker2012-12-033-4/+49
| | | | | | | | | | | | | | | | Write the client's ip address to any state file and all appropriate state for that client will be forgotten. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Add a custom file operations structure for fault injectionBryan Schumaker2012-12-031-7/+49
| | | | | | | | | | | | | | | | | | Controlling the read and write functions allows me to add in "forget client w.x.y.z", since we won't be limited to reading and writing only u64 values. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Reading a fault injection file prints a state countBryan Schumaker2012-12-033-2/+58
| | | | | | | | | | | | | | | | | | | | I also log basic information that I can figure out about the type of state (such as number of locks for each client IP address). This can be useful for checking that state was actually dropped and later for checking if the client was able to recover. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Fault injection operations take a per-client forget functionBryan Schumaker2012-12-033-42/+16
| | | | | | | | | | | | | | | | | | | | The eventual goal is to forget state based on ip address, so it makes sense to call this function in a for-each-client loop until the correct amount of state is forgotten. I also use this patch as an opportunity to rename the forget function from "func()" to "forget()". Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Clean up forgetting and recalling delegationsBryan Schumaker2012-12-031-44/+50
| | | | | | | | | | | | | | | | Once I have a client, I can easily use its delegation list rather than searching the file hash table for delegations to remove. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Clean up forgetting openownersBryan Schumaker2012-12-031-27/+22
| | | | | | | | | | | | | | | | Using "forget_n_state()" forces me to implement the code needed to forget a specific client's openowners. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Clean up forgetting locksBryan Schumaker2012-12-031-8/+28
| | | | | | | | | | | | | | | | | | | | I use the new "forget_n_state()" function to iterate through each client first when searching for locks. This may slow down forgetting locks a little bit, but it implements most of the code needed to forget a specified client's locks. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Clean up forgetting clientsBryan Schumaker2012-12-032-5/+23
| | | | | | | | | | | | | | | | | | | | I added in a generic for-each loop that takes a pass over the client_lru list for the current net namespace and calls some function. The next few patches will update other operations to use this function as well. A value of 0 still means "forget everything that is found". Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Lock state before calling fault injection functionBryan Schumaker2012-12-032-16/+4
| | | | | | | | | | | | | | | | Each function touches state in some way, so getting the lock earlier can help simplify code. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd4: discard some unused nfsd4_verify xdr codeJ. Bruce Fields2012-12-031-19/+2
| | | | | | | | Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * NFSD: Fold fault_inject.h into state.hBryan Schumaker2012-11-285-31/+16
| | | | | | | | | | | | | | | | | | | | There were only a small number of functions in this file and since they all affect stored state I think it makes sense to put them in state.h instead. I also dropped most static inline declarations since there are no callers when fault injection is not enabled. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: make NFSv4 grace time per netStanislav Kinsbursky2012-11-284-9/+7
| | | | | | | | | | | | | | | | Grace time is a part of NFSv4 state engine, which is constructed per network namespace. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: make NFSv4 lease time per netStanislav Kinsbursky2012-11-286-12/+19
| | | | | | | | | | | | | | | | Lease time is a part of NFSv4 state engine, which is constructed per network namespace. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
| * nfsd: remove redundant declarationsStanislav Kinsbursky2012-11-281-3/+0
| | | | | | | | | | | | | | | | This is a cleanup patch. Functions nfsd_pool_stats_open() and nfsd_pool_stats_release() are declared in fs/nfsd/nfsd.h. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
OpenPOWER on IntegriCloud