aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAge
* NFSv4: Fix up stateid locking...Trond Myklebust2007-07-10
| | | | | | | We really don't need to grab both the state->so_owner and the inode->i_lock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Clean up the callers of nfs4_open_recover_helper()Trond Myklebust2007-07-10
| | | | | | | | Rely on nfs4_try_open_cached() when appropriate. Also fix an RCU violation in _nfs4_do_open_reclaim() Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Don't call OPEN if we already have an open stateid for a fileTrond Myklebust2007-07-10
| | | | | | | | If we already have a stateid with the correct open mode for a given file, then we can reuse that stateid instead of re-issuing an OPEN call without violating the close-to-open caching semantics. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Check for the existence of a delegation in nfs4_open_prepare()Trond Myklebust2007-07-10
| | | | | | | We should not be calling open() on an inode that has a delegation unless we're doing a reclaim. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Clean up _nfs4_proc_open()Trond Myklebust2007-07-10
| | | | | | Use a flag instead of the 'data->rpc_status = -ENOMEM hack. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Allow nfs4_opendata_to_nfs4_state to return errors.Trond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Improve the debugging of bad sequence id errors...Trond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Always use the delegation if we have oneTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Clean up confirmation of sequence ids...Trond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Defer inode revalidation when setting up a delegationTrond Myklebust2007-07-10
| | | | | | | | | Currently we force a synchronous call to __nfs_revalidate_inode() in nfs_inode_set_delegation(). This not only ensures that we cannot call nfs_inode_set_delegation from an asynchronous context, but it also slows down any call to open(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Use RCU to protect delegationsTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Support recalling delegations by stateid part 2Trond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Support recalling delegations by stateidTrond Myklebust2007-07-10
| | | | | | | | | There appear to be some rogue servers out there that issue multiple delegations with different stateids for the same file. Ensure that when we return delegations, we do so on a per-stateid basis rather than a per-file basis. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix up a bug in nfs4_open_recover()Trond Myklebust2007-07-10
| | | | | | Don't clobber the delegation info... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: set the delegation in nfs4_opendata_to_nfs4_stateTrond Myklebust2007-07-10
| | | | | | | | | This ensures that nfs4_open_release() and nfs4_open_confirm_release() can now handle an eventual delegation that was returned with out open. As such, it fixes a delegation "leak" when the user breaks out of an open call. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix a bug in __nfs4_find_state_byownerTrond Myklebust2007-07-10
| | | | | | | | The test for state->state == 0 does not tell you that the stateid is in the process of being freed. It really tells you that the stateid is not yet initialised... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix atomic open for execute...Trond Myklebust2007-07-10
| | | | | | | | Currently we do not check for the FMODE_EXEC flag as we should. For that particular case, we need to perform an ACCESS call to the server in order to check that the file is executable. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Reduce the chances of an open_owner identifier collisionTrond Myklebust2007-07-10
| | | | | | Currently we just use a 32-bit counter. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: nfs_increment_open_seqid should not return a valueTrond Myklebust2007-07-10
| | | | | | It is a void function... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix underestimate of NFSv4 lookup request sizeTrond Myklebust2007-07-10
| | | | | | Also fix up the underestimate of fs_locations Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix the underestimate of NFSv4 open request sizeTrond Myklebust2007-07-10
| | | | | | | The maximum size depends on the filename size and a number of other elements which are currently not being counted. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix the NFSv4 owner and owner_group size estimatesTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Don't reuse expired nfs4_state_owner structsTrond Myklebust2007-07-10
| | | | | | That just confuses certain NFSv4 servers. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Fix a credential reference leak in nfs4_get_state_owner()Trond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Replace NFS_I(inode)->req_lock with inode->i_lockTrond Myklebust2007-07-10
| | | | | | | There is no justification for keeping a special spinlock for the exclusive use of the NFS writeback code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Clean up _nfs4_proc_lookup() vs _nfs4_proc_lookupfh()Trond Myklebust2007-07-10
| | | | | | | They differ only slightly in the arguments they take. Why have they not been merged? Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Remove the tk_auth macro...Trond Myklebust2007-07-10
| | | | | | | | We should almost always be deferencing the rpc_auth struct by means of the credential's cr_auth field instead of the rpc_clnt->cl_auth anyway. Fix up that historical mistake, and remove the macro that propagated it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Remove redundant calls to rpciod_up()/rpciod_down()Trond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Kill rpc_clnt->cl_oneshotTrond Myklebust2007-07-10
| | | | | | | Replace it with explicit calls to rpc_shutdown_client() or rpc_destroy_client() (for the case of asynchronous calls). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* SUNRPC: Convert rpc_clnt->cl_users to a krefTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Convert struct nfs4_opendata to use struct krefTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Convert struct nfs_open_context to use a krefTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: reduce latency by using conditional rescheduling in nfs_scan_listTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Prevent integer overflow in nfs_scan_list()Trond Myklebust2007-07-10
| | | | | | | Also ensure that nfs_inode ncommit and npages are large enough to represent all possible values for the number of pages. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Remove the redundant 'dirty' and 'commit' lists from nfs_inodeTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS cleanup: speed up nfs_scan_commit using radix tree tagsTrond Myklebust2007-07-10
| | | | | | Add a tag for requests that are waiting for a COMMIT Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS cleanup: Rename NFS_PAGE_TAG_WRITEBACK to NFS_PAGE_TAG_LOCKEDTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Convert struct nfs_page to use krefsTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Fix an Oops in the nfs_access_cache_shrinker()Trond Myklebust2007-07-10
| | | | | | The nfs_access_cache_shrinker may race with nfs_access_zap_cache(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: nfs3_proc_create() should use nfs_post_op_update_inode()Trond Myklebust2007-07-10
| | | | | | | Also get rid of a redundant call to nfs_setattr_update_inode(). The call to nfs3_proc_setattr() already takes care of that. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS4: on a O_EXCL OPEN make sure SETATTR sets the fields holding the verifierJeff Layton2007-07-10
| | | | | | | | | | | | | | | | | The Linux NFS4 client simply skips over the bitmask in an O_EXCL open call and so it doesn't bother to reset any fields that may be holding the verifier. This patch has us save the first two words of the bitmask (which is all the current client has #defines for). The client then later checks this bitmask and turns on the appropriate flags in the sattr->ia_verify field for the following SETATTR call. This patch only currently checks to see if the server used the atime and mtime slots for the verifier (which is what the Linux server uses for this). I'm not sure of what other fields the server could reasonably use, but adding checks for others should be trivial. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Re-enable forced umountsTrond Myklebust2007-07-10
| | | | | | They disappeared some time around 2.6.18. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Use GFP_HIGHUSER for page allocation in nfs_symlink()Jeff Layton2007-07-10
| | | | | | | | nfs_symlink() allocates a GFP_KERNEL page for the pagecache. Most pagecache pages are allocated using GFP_HIGHUSER, and there's no reason not to do that in nfs_symlink() as well. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* NFS: Fix nfs_reval_fsid()Trond Myklebust2007-07-10
| | | | | | | We don't need to revalidate the fsid on the root directory. It suffices to revalidate it on the current directory. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Clean up nfs4_call_async()Trond Myklebust2007-07-10
| | | | | | Use rpc_run_task() instead of doing it ourselves. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Ensure that nfs4_do_close() doesn't race with umountTrond Myklebust2007-07-10
| | | | | | | | | | | nfs4_do_close() does not currently have any way to ensure that the user won't attempt to unmount the partition while the asynchronous RPC call is completing. This again may cause Oopses in nfs_update_inode(). Add a vfsmount argument to nfs4_close_state to ensure that the partition remains mounted while we're closing the file. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Ensure asynchronous open() calls always pin the mountpointTrond Myklebust2007-07-10
| | | | | | | | A number of race conditions may currently ensue if the user presses ^C and then unmounts the partition while an asynchronous open() is in progress. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFSv4: Cleanup: pass the nfs_open_context to open recovery codeTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Replace vfsmount and dentry in nfs_open_context with struct pathTrond Myklebust2007-07-10
| | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
* NFS: Minor read optimisation...Trond Myklebust2007-07-10
| | | | | | | | Since PG_uptodate may now end up getting set during the call to nfs_wb_page(), we can avoid putting a read request on the wire in those situations. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>