summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-22NFS: Use proper naming conventions for nfs_client.impl_id fieldChuck Lever
Clean up: When naming fields and data types, follow established conventions to facilitate accurate grep/cscope searches. Additionally, for consistency, move the impl_id field into the NFSv4- specific part of the nfs_client, and free that memory in the logic that shuts down NFSv4 nfs_clients. Introduced by commit 7d2ed9ac "NFSv4: parse and display server implementation ids," Fri Feb 17, 2012. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFS: Use proper naming conventions for NFSv4.1 server scope fieldsChuck Lever
Clean up: When naming fields and data types, follow established conventions to facilitate accurate grep/cscope searches. Additionally, for consistency, move the scope field into the NFSv4- specific part of the nfs_client, and free that memory in the logic that shuts down NFSv4 nfs_clients. Introduced by commit 99fe60d0 "nfs41: exchange_id operation", April 1 2009. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFS: Fix comment misspelling in struct nfs_client definitionChuck Lever
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFS: Add NFSDBG_STATEChuck Lever
fs/nfs/nfs4state.c does not yet have any dprintk() call sites, and I'm about to introduce some. We will need a new flag for enabling them. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFS: Don't swap bytes in nfs4_construct_boot_verifier()Chuck Lever
The SETCLIENTID boot verifier is opaque to NFSv4 servers, thus there is no requirement for byte swapping before the client puts the verifier on the wire. This treatment is similar to other timestamp-based verifiers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFS: Fix compiler warningsBryan Schumaker
The "struct inode *inode" was only used in a dprintk, so compiling with CONFIG_SUNRPC_DEBUG off triggers a warning. To get around this, I remove the "struct inode *inode" variable and instead change the dprintk()s to use hdr->inode instead. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFSv4.1 skip rpc_call_done only on disconnected DS slot_table_waitq tasksAndy Adamson
We reset all I/O on a disconnected data server through the pgio layer indicated by the NFS_IOHDR_REDO flag. Differentiate between on-the-wire tasks returning with an error which must call rpc_call_done and tasks woken from the data server slot_table_waitq waiting for a session slot with a status of zero which call rpc_exit in rpc_prepare and need to skip rpc_call_done. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFSv4.1 Just use nfs_put_client in filelayout releaseAndy Adamson
Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFSv4.1 fix null state reference in filelayout_async_handle_errorAndy Adamson
Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-22NFSv4.1: Fix a bad reference count issue in the pNFS commit codeTrond Myklebust
filelayout_scan_commit_lists needs to bump the reference count on the struct nfs_page just like nfs_scan_commit_list(). Reported-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-21Merge branch 'bugfixes' into nfs-for-nextTrond Myklebust
2012-05-19NFSv4.1 resend LAYOUTGET on data server invalid layout errorsAndy Adamson
The "invalid layout" class of errors is handled by destroying the layout and getting a new layout from the server. Currently, the layout must be destroyed before a new layout can be obtained. This means that all references (e.g.lsegs) to the "to be destroyed" layout header must be dropped before it can be destroyed. This in turn means waiting for all in flight RPC's using the old layout as well as draining the data server session slot table wait queue. Set the NFS_LAYOUT_INVALID flag to redirect I/O to the MDS while waiting for the old layout to be destroyed. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 dereference a disconnected data server client recordAndy Adamson
When the last DS io is processed, the data server client record will be freed. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 ref count nfs_client across filelayout data server ioAndy Adamson
Prepare to put a dis-connected DS client record. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 send layoutreturn to fence disconnected data serverAndy Adamson
Let the MDS know that you are redirecting I/O from pNFS to MDS. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 wake up all tasks on un-connected DS slot table waitqAndy Adamson
The DS has a connection error (invalid deviceid). Drain the fore channel slot table waitq. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 Check invalid deviceid upon slot table waitq wakeupAndy Adamson
Tasks sleeping on the slot table waitq wake to the rpc_prepare_task state. Reset the task for io through the MDS if the deviceid is invalid. The reset functions put the io pages through the pageio layer which has the advantage of re-coalescing which allows for the MDS and DS having different r/wsizes. Exit the awakened task without executing the rpc_call_done routine. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 remove nfs4_reset_write and nfs4_reset_readAndy Adamson
Replaced by filelayout_reset_write and filelayout_reset_read Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1: mark deviceid invalid on filelayout DS connection errorsAndy Adamson
This prevents the use of any layout for i/o that references the deviceid. I/O is redirected through the MDS. Redirect the unhandled failed I/O to the MDS without marking either the layout or the deviceid invalid. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 data server timeo and retrans module parametersAndy Adamson
Set the recovery parameters for data servers. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 set RPC_TASK_SOFTCONN for filelayout DS RPC callsAndy Adamson
RPC_TASK_SOFTCONN returns connection errors to the caller which allows the pNFS file layout to quickly try the MDS or perhaps another DS. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1 cleanup filelayout invalid layout handlingAndy Adamson
The invalid layout bits are should only be used to block LAYOUTGETs. Do not invalidate a layout on deviceid invalidation. Do not invalidate a layout on un-handled READ, WRITE, COMMIT errors. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19NFSv4.1: cleanup filelayout invalid deviceid handlingAndy Adamson
Move the invalid deviceid test into nfs4_fl_prepare_ds, called by the filelayout read, write, and commit routines. NFS4_DEVICE_ID_NEG_ENTRY is no longer needed. Remove redundant printk's - filelayout_mark_devid_invalid prints a KERN_WARNING. An invalid device prevents pNFS io. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19Fixed goto readability in nfs_update_inode.Matthew Treinish
Simplified error gotos to make it slightly easier to read, it doesn't affect the functionality of the routine. Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-19sunrpc: fix loss of task->tk_status after rpc_delay call in xprt_alloc_slotTrond Myklebust
xprt_alloc_slot will call rpc_delay() to make the task wait a bit before retrying when it gets back an -ENOMEM error from xprt_dynamic_alloc_slot. The problem is that rpc_delay will clear the task->tk_status, causing call_reserveresult to abort the task. The solution is simply to let call_reserveresult handle the ENOMEM error directly. Reported-by: Jeff Layton <jlayton@redhat.com> Cc: stable@vger.kernel.org [>= 3.1] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-16sunrpc: suppress page allocation warnings in xprt_alloc_slot()Jeff Layton
It's easily possible for these allocations to fail since we're using GFP_NOWAIT here. We don't want to spam the logs with warnings about that though. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-16NFS: fix unsigned comparison in nfs4_create_sec_clientBenny Halevy
fs/nfs/nfs4namespace.c: In function ‘nfs4_create_sec_client’: fs/nfs/nfs4namespace.c:171:2: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] Introduced by commit 72de53ec4bca39c26709122a8f78bfefe7b6bca4 "NFS: Do secinfo as part of lookup" Signed-off-by: Benny Halevy <bhalevy@tonian.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-16NFS: Fix a compile issue when CONFIG_NFS_FSCACHE was undefinedTrond Myklebust
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-16rpc_pipefs: clear write bit from top level rpc_pipefs directoryJeff Layton
We can't create new files or directories here from userspace, so let's not pretend that this directory is writable. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15sunrpc: fix kernel-doc warningsRandy Dunlap
Fix kernel-doc warnings in sunrpc/rpc_pipe.c and sunrpc/rpcb_clnt.c: Warning(net/sunrpc/rpcb_clnt.c:428): No description found for parameter 'net' Warning(net/sunrpc/rpcb_clnt.c:567): No description found for parameter 'net' Warning(net/sunrpc/rpc_pipe.c:133): No description found for parameter 'pipe' Warning(net/sunrpc/rpc_pipe.c:133): Excess function parameter 'inode' description in 'rpc_queue_upcall' Warning(net/sunrpc/rpc_pipe.c:839): No description found for parameter 'pipe' Warning(net/sunrpc/rpc_pipe.c:839): Excess function parameter 'ops' description in 'rpc_mkpipe_dentry' Warning(net/sunrpc/rpc_pipe.c:839): Excess function parameter 'flags' description in 'rpc_mkpipe_dentry' Warning(net/sunrpc/rpc_pipe.c:949): No description found for parameter 'dentry' Warning(net/sunrpc/rpc_pipe.c:949): Excess function parameter 'clnt' description in 'rpc_remove_client_dir' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: kmalloc() doesn't return an ERR_PTR()Dan Carpenter
Obviously we should check for NULL here instead of IS_ERR(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@vger.kernel.org [3.4] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Turn v3 on by defaultBryan Schumaker
Most users will use NFS v3 or possibly v4 so this makes it easier for them. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Make v2 configurableBryan Schumaker
With this patch NFS v2 can be disabled during Kconfig. I default the option to "y" to match the current behavior. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Create an NFS v3 stat_to_errno()Bryan Schumaker
In theory, NFS v3 can have different error versions than NFS v2. v4 is already using its own nfs4_stat_to_errno() to map error codes, so rather than create something in the generic client for v2 and v3 to share I instead give v3 its own function. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Pass mntfh as part of the nfs_mount_info structureBryan Schumaker
This allows me to use the filehandle allocated in nfs_fs_mount() for nfs v4 mounts instead of allocating a new one. Rather than change nfs4_mount() to look almost exactly like nfs_fs_mount(), I instead remove the function. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Allocate parsed mount data directly to the nfs_mount_info structureBryan Schumaker
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Create a single nfs_validate_mount_data() functionBryan Schumaker
This new function chooses between the v2/3 parser and the v4 parser by filesystem type. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Create a single function for text mount dataBryan Schumaker
The v2/3 and v4 cases were very similar, with just a few parameters changed. This makes it easy to share code. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Create a new nfs_try_mount()Bryan Schumaker
This function returns the same same return type as nfs4_try_mount() so they two can be more easily substituted. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Let mount data parsing set the NFS versionBryan Schumaker
This field is unconditionally set while parsing mount data, so there is no need to fill it in here. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Use nfs_fs_mount_common() for remote referral mountsBryan Schumaker
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Use nfs_fs_mount_common() for xdev mountsBryan Schumaker
At this point, there are only a few small differences between these two functions. I can set a few function pointers in the nfs_mount_info struct to get around these differences. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Create a common xdev_mount() functionBryan Schumaker
The only difference between nfs_xdev_mount() and nfs4_xdev_mount() is the clone_super() function called to clone the super block. I can combine these two functions by using the fill_super field in the mount_info structure. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Create a common fs_mount() functionBryan Schumaker
The nfs4_remote_mount() function was only slightly different from the nfs_fs_mount() function used by the generic client. I created a new nfs_mount_info structure to set different parameters to help combine these functions. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Remove NFS4_MOUNT_UNSHAREDBryan Schumaker
This flag is numerically equivalent to NFS_MOUNT_UNSHARED, so I can remove it to make collapsing functions more straightforward. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Don't pass mount data to nfs_fscache_get_super_cookie()Bryan Schumaker
I intend on creating a single nfs_fs_mount() function used by all our mount paths. To avoid checking between new mounts and clone mounts, I instead pass both structures to a new function in super.c that finds the cache key and then looks up the super cookie. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Create a single nfs_get_root()Bryan Schumaker
This patch splits out the NFS v4 specific functionality of nfs4_get_root() into its own rpc_op called by the generic client, and leaves nfs4_proc_get_rootfh() as its own stand alone function. This also allows me to change nfs4_remote_mount(), nfs4_xdev_mount() and nfs4_remote_referral_mount() to use the generic client's nfs_get_root() function. Later patches in this series will collapse these functions into one common function, so using the same get_root() function everywhere simplifies future changes. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-15NFS: Rename nfs4_proc_get_root()Bryan Schumaker
This function is really getting the root filehandle and not the root dentry of the filesystem. I also removed the rpc_ops lookup from nfs4_get_rootfh() under the assumption that if we reach this function then we already know we are using NFS v4. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-05-13Linux 3.4-rc7Linus Torvalds
.. and this should hopefully be the last -rc before final 3.4 release.
2012-05-13Merge tag 'fixes-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM: SoC fixes from Olof Johansson: "I was hoping to be done with fixes for 3.4 but we got two branches from subarch maintainers the last couple of days. So here is one last(?) pull request for arm-soc containing 7 patches: - Five of them are for shmobile dealing with SMP setup and compile failures - The remaining two are for regressions on the Samsung platforms" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: EXYNOS: fix ctrlbit for exynos5_clk_pdma1 ARM: EXYNOS: use s5p-timer for UniversalC210 board ARM / mach-shmobile: Invalidate caches when booting secondary cores ARM / mach-shmobile: sh73a0 SMP TWD boot regression fix ARM / mach-shmobile: r8a7779 SMP TWD boot regression fix ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper