summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* NFSv4: Add tracepoints for debugging renameTrond Myklebust2013-08-222-4/+49
| | | | | | Add tracepoints to debug renames. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Add tracepoints for debugging inode manipulationsTrond Myklebust2013-08-222-14/+73
| | | | | | | | Set up basic tracepoints for debugging NFSv4 setattr, access, readlink, readdir, get_acl set_acl get_security_label, and set_security_label. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Add tracepoints for debugging lookup/create operationsTrond Myklebust2013-08-222-14/+72
| | | | | | | Set up basic tracepoints for debugging NFSv4 lookup, unlink/remove, symlink, mkdir, mknod, fs_locations and secinfo. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Add tracepoints for debugging file lockingTrond Myklebust2013-08-222-2/+82
| | | | | | Set up basic tracepoints for debugging NFSv4 file lock/unlock Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Add tracepoints for debugging file openTrond Myklebust2013-08-222-0/+129
| | | | | | Set up basic tracepoints for debugging NFSv4 file open/close Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Add tracepoints for debugging state management problemsTrond Myklebust2013-08-224-1/+245
| | | | | | | Set up basic tracepoints for debugging client id creation/destruction and session creation/destruction. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add tracepoints for debugging NFS hard linksTrond Myklebust2013-08-222-0/+72
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add tracepoints for debugging NFS rename and sillyrename issuesTrond Myklebust2013-08-223-0/+146
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add tracepoints for debugging directory changesTrond Myklebust2013-08-222-1/+104
| | | | | | Add tracepoints for mknod, mkdir, rmdir, remove (unlink) and symlink. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add tracepoints for debugging generic file create eventsTrond Myklebust2013-08-222-0/+72
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add event tracing for generic NFS lookupsTrond Myklebust2013-08-223-0/+203
| | | | | | Add tracepoints for lookup, lookup_revalidate and atomic_open Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Pass in lookup flags from nfs_atomic_open to nfs_lookupTrond Myklebust2013-08-221-1/+3
| | | | | | | When doing an open of a directory, ensure that we do pass the lookup flags from nfs_atomic_open into nfs_lookup. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Add event tracing for generic NFS eventsTrond Myklebust2013-08-227-11/+231
| | | | | | | | | | | Add tracepoints for inode attribute updates, attribute revalidation, writeback start/end fsync start/end, attribute change start/end, permission check start/end. The intention is to enable performance tracing using 'perf'as well as improving debugging. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: refactor code for calculating the crc32 hash of a filehandleTrond Myklebust2013-08-222-2/+21
| | | | | | | We want to be able to display the crc32 hash of the filehandle in tracepoints. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Clean up nfs_sillyrename()Trond Myklebust2013-08-221-10/+16
| | | | | | | Optimise for the case where we only do one lookup. Clean up the code so it is obvious that silly[] is not a dynamic array. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix an incorrect pointer declaration in decode_first_pnfs_layout_typeTrond Myklebust2013-08-221-1/+1
| | | | | | | We always encode to __be32 format in XDR: silences a sparse warning. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Andy Adamson <andros@netapp.com>
* NFSv4: Deal with a sparse warning in nfs_idmap_get_key()Trond Myklebust2013-08-221-1/+1
| | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Bryan Schumaker <bjschuma@netapp.com>
* NFSv4: Deal with some more sparse warningsTrond Myklebust2013-08-222-7/+7
| | | | | | | | Technically, we don't really need to convert these time stamps, since they are actually cookies. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Chuck Lever <Chuck.Lever@oracle.com>
* NFSv4: Deal with a sparse warning in nfs4_opendata_allocTrond Myklebust2013-08-221-1/+1
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv3: Deal with a sparse warning in nfs3_proc_createTrond Myklebust2013-08-211-2/+2
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Remove the NFSv4 "open optimisation" from nfs_permissionTrond Myklebust2013-08-201-5/+0
| | | | | | | | Ever since commit 6168f62cb (Add ACCESS operation to OPEN compound) the NFSv4 atomic open has primed the access cache, and so nfs_permission will no longer do an RPC call on the wire. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4.1 Use clientid management rpc_clnt for secinfo_no_nameAndy Adamson2013-08-081-1/+6
| | | | | | | | | | As per RFC 5661 Security Considerations Commit 4edaa308 "NFS: Use "krb5i" to establish NFSv4 state whenever possible" uses the nfs_client cl_rpcclient for all clientid management operations. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4.1 Use clientid management rpc_clnt for secinfoAndy Adamson2013-08-081-1/+6
| | | | | | | | | | As per RFC 3530 and RFC 5661 Security Considerations Commit 4edaa308 "NFS: Use "krb5i" to establish NFSv4 state whenever possible" uses the nfs_client cl_rpcclient for all clientid management operations. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4.1 Increase NFS4_DEF_SLOT_TABLE_SIZEAndy Adamson2013-08-071-1/+1
| | | | | | | | | | Increase NFS4_DEF_SLOT_TABLE_SIZE which is used as the client ca_maxreequests value in CREATE_SESSION. Current non-dynamic session slot server implementations use the client ca_maxrequests as a maximum slot number: 64 session slots can handle most workloads. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS Remove unused authflavour parameter from init_clientAndy Adamson2013-08-074-10/+6
| | | | | Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Never use user credentials for lease renewalChuck Lever2013-08-074-58/+11
| | | | | | | | | | | | | Never try to use a non-UID 0 user credential for lease management, as that credential can change out from under us. The server will block NFSv4 lease recovery with NFS4ERR_CLID_INUSE. Since the mechanism to acquire a credential for lease management is now the same for all minor versions, replace the minor version- specific callout with a single function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Use root's credential for lease management when keytab is missingChuck Lever2013-08-071-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 05f4c350 "NFS: Discover NFSv4 server trunking when mounting" Fri Sep 14 17:24:32 2012 introduced Uniform Client String support, which forces our NFS client to establish a client ID immediately during a mount operation rather than waiting until a user wants to open a file. Normally machine credentials (eg. from a keytab) are used to perform a mount operation that is protected by Kerberos. Before 05fc350, SETCLIENTID used a machine credential, or fell back to a regular user's credential if no keytab is available. On clients that don't have a keytab, performing SETCLIENTID early means there's no user credential to fall back on, since no regular user has kinit'd yet. 05f4c350 seems to have broken the ability to mount with sec=krb5 on clients that don't have a keytab in kernels 3.7 - 3.10. To address this regression, commit 4edaa308 (NFS: Use "krb5i" to establish NFSv4 state whenever possible), Sat Mar 16 15:56:20 2013, was merged in 3.10. This commit forces the NFS client to fall back to AUTH_SYS for lease management operations if no keytab is available. Neil Brown noticed that, since root is required to kinit to do a sec=krb5 mount when a client doesn't have a keytab, we can try to use root's Kerberos credential before AUTH_SYS. Now, when determining a principal and flavor to use for lease management, the NFS client tries in this order: 1. Flavor: AUTH_GSS, krb5i Principal: service principal (via keytab) 2. Flavor: AUTH_GSS, krb5i Principal: user principal established for UID 0 (via kinit) 3. Flavor: AUTH_SYS Principal: UID 0 / GID 0 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Refuse mount attempts with proto=udpTrond Myklebust2013-08-071-0/+12
| | | | | | RFC3530 disallows the use of udp as a transport protocol for NFSv4. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* nfs: verify open flags before allowing an atomic openJeff Layton2013-08-071-0/+4
| | | | | | | | | | Currently, you can open a NFSv4 file with O_APPEND|O_DIRECT, but cannot fcntl(F_SETFL,...) with those flags. This flag combination is explicitly forbidden on NFSv3 opens, and it seems like it should also be on NFSv4. Reported-by: Chao Ye <cye@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix nfs4_init_uniform_client_string for net namespacesTrond Myklebust2013-07-241-2/+6
| | | | | | | | | | | | | | | | Commit 6f2ea7f2a (NFS: Add nfs4_unique_id boot parameter) introduces a boot parameter that allows client administrators to set a string identifier for use by the EXCHANGE_ID and SETCLIENTID arguments in order to make them more globally unique. Unfortunately, that uniquifier is no longer globally unique in the presence of net namespaces, since each container expects to be able to set up their own lease when mounting a new NFSv4/4.1 partition. The fix is to add back in the container-specific hostname in addition to the unique id. Cc: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4.1 Use the mount point rpc_clnt for layoutreturnAndy Adamson2013-07-231-1/+1
| | | | | | | Should not use the clientid maintenance rpc_clnt. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix return type of nfs4_end_drain_session() stubChuck Lever2013-07-231-1/+1
| | | | | | | | | Clean up: when NFSv4.1 support is compiled out, nfs4_end_drain_session() becomes a stub. Make the synopsis of the stub match the synopsis of the real version of the function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* rpc_pipe: convert back to simple_dir_inode_operationsJeff Layton2013-07-231-18/+1
| | | | | | | | Now that Al has fixed simple_lookup to account for the case where sb->s_d_op is set, there's no need to keep our own special lookup op. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* nfs: fix open(O_RDONLY|O_TRUNC) in NFS4.0Nadav Shemer2013-07-231-2/+2
| | | | | | | | | nfs4_proc_setattr removes ATTR_OPEN from sattr->ia_valid, but later nfs4_do_setattr checks for it Signed-off-by: Nadav Shemer <nadav@tonian.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: encode_attrs should not backfill the bitmap and attribute lengthTrond Myklebust2013-07-231-72/+53
| | | | | | | | The attribute length is already calculated in advance. There is no reason why we cannot calculate the bitmap in advance too so that we don't have to play pointer games. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2013-07-2316-180/+381
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha Pull alpha architecture fixes from Matt Turner: "This contains mostly clean ups and fixes but also an implementation of atomic64_dec_if_positive() and a pair of new syscalls" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: Use handle_percpu_irq for the timer interrupt alpha: Force the user-visible HZ to a constant 1024. alpha: Don't if-out dp264_device_interrupt. alpha: Use __builtin_alpha_rpcc alpha: Fix type compatibility warning for marvel_map_irq alpha: Generate dwarf2 unwind info for various kernel entry points. alpha: Implement atomic64_dec_if_positive alpha: Improve atomic_add_unless alpha: Modernize lib/mpi/longlong.h alpha: Add kcmp and finit_module syscalls alpha: locks: remove unused arch_*_relax operations alpha: kernel: typo issue, using '1' instead of '11' alpha: kernel: using memcpy() instead of strcpy() alpha: Convert print_symbol to %pSR
| * alpha: Use handle_percpu_irq for the timer interruptRichard Henderson2013-07-191-1/+1
| | | | | | | | | | Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Force the user-visible HZ to a constant 1024.Richard Henderson2013-07-192-10/+5
| | | | | | | | | | | | | | This kernel/user split was done long ago for other architectures. Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Don't if-out dp264_device_interrupt.Richard Henderson2013-07-191-8/+0
| | | | | | | | | | | | | | The code as written is correct, and will be used by QEMU emulation. Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Use __builtin_alpha_rpccRichard Henderson2013-07-191-3/+1
| | | | | | | | | | | | | | As introduced in gcc 3.2. Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Fix type compatibility warning for marvel_map_irqRichard Henderson2013-07-191-1/+2
| | | | | | | | | | | | | | Acked-by: Phil Carmody <pc+lkml@asdf.org> Reviewed-and-Tested-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Generate dwarf2 unwind info for various kernel entry points.Richard Henderson2013-07-191-111/+288
| | | | | | | | | | | | | | | | | | Having unwind info past the PALcode generated stack frame makes debugging the kernel significantly easier. Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Implement atomic64_dec_if_positiveRichard Henderson2013-07-192-0/+29
| | | | | | | | | | | | Reviewed-and-Tested-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Improve atomic_add_unlessRichard Henderson2013-07-191-23/+37
| | | | | | | | | | | | | | | | | | Use ll/sc loops instead of C loops around cmpxchg. Update the atomic64_add_unless block comment to match the code. Reviewed-and-Tested-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Modernize lib/mpi/longlong.hRichard Henderson2013-07-191-10/+7
| | | | | | | | | | | | | | | | | | Remove the compile warning for __udiv_qrnnd not having a prototype. Use the __builtin_alpha_umulh introduced in gcc 4.0. Reviewed-and-Tested-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: Add kcmp and finit_module syscallsRichard Henderson2013-07-193-2/+5
| | | | | | | | | | | | Reviewed-and-Tested-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * alpha: locks: remove unused arch_*_relax operationsWill Deacon2013-07-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | The arch_{spin,read,write}_relax macros are not used anywhere in the kernel and are typically just aliases for cpu_relax(). This patch removes the unused definitions for Alpha. Cc: Al Viro <viro@zeniv.linux.org.uk> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
| * alpha: kernel: typo issue, using '1' instead of '11'Chen Gang2013-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For sending message: *(unsigned int *)&cpu->ipc_buffer[0] = len; cp1 = (char *) &cpu->ipc_buffer[1]; But for receive message: cnt = cpu->ipc_buffer[0] >> 32; ... cp1 = (char *) &cpu->ipc_buffer[11]; They are not pairs, it is typo issue of the redundency '1'. So need use '1' instead of '11'. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Chen Gang <gang.chen@asianux.com>
| * alpha: kernel: using memcpy() instead of strcpy()Chen Gang2013-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When sending message in send_secondary_console_msg(), the length is not include the NUL byte, and also not copy NUL to 'ipc_buffer'. When receive message in recv_secondary_console_msg(), the 'cnt' also excludes NUL. So when get string from ipc_buffer, it may not be NUL terminated. Then use memcpy() instead of strcpy(), and set last byte NUL. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Chen Gang <gang.chen@asianux.com>
| * alpha: Convert print_symbol to %pSRJoe Perches2013-07-191-5/+3
| | | | | | | | | | | | | | | | | | Use the new vsprintf extension to avoid any possible message interleaving. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Joe Perches <joe@perches.com>
OpenPOWER on IntegriCloud