diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 13:43:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 13:43:51 -0400 |
commit | 53f2c4a8fd882009a2a75c5b72d6898c0808616e (patch) | |
tree | 922293a1056c0c2358203cdab832f0e0891e628a /fs/nfs/proc.c | |
parent | 8f6576ad476b2a22d05ddafd2ddaee102577a4ed (diff) | |
parent | cc0a98436820b161b595b8cc1d2329bcf7328107 (diff) |
Merge tag 'nfs-for-3.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"New features include:
- Rewrite the O_DIRECT code so that it can share the same coalescing
and pNFS functionality as the page cache code.
- Allow the server to provide hints as to when we should use pNFS,
and when it is more efficient to read and write through the
metadata server.
- NFS cache consistency updates:
* Use the ctime to emulate a change attribute for NFSv2/v3 so that
all NFS versions can share the same cache management code.
* New cache management code will only look at the change attribute
and size attribute when deciding whether or not our cached data
is still valid or not.
* Don't request NFSv4 post-op attributes on writes in cases such as
O_DIRECT, where we don't care about data cache consistency, or
when we have a write delegation, and know that our cache is still
consistent.
* Don't request NFSv4 post-op attributes on operations such as
COMMIT, where there are no expected metadata updates.
* Don't request NFSv4 directory post-op attributes in cases where
the operations themselves already return change attribute
updates: i.e. operations such as OPEN, CREATE, REMOVE, LINK and
RENAME.
- Speed up 'ls' and friends by using READDIR rather than READDIRPLUS
if we detect no attempts to lookup filenames.
- Improve the code sharing between NFSv2/v3 and v4 mounts
- NFSv4.1 state management efficiency improvements
- More patches in preparation for NFSv4/v4.1 migration functionality."
Fix trivial conflict in fs/nfs/nfs4proc.c that was due to the dcache
qstr name initialization changes (that made the length/hash a 64-bit
union)
* tag 'nfs-for-3.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (146 commits)
NFSv4: Add debugging printks to state manager
NFSv4: Map NFS4ERR_SHARE_DENIED into an EACCES error instead of EIO
NFSv4: update_changeattr does not need to set NFS_INO_REVAL_PAGECACHE
NFSv4.1: nfs4_reset_session should use nfs4_handle_reclaim_lease_error
NFSv4.1: Handle other occurrences of NFS4ERR_CONN_NOT_BOUND_TO_SESSION
NFSv4.1: Handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION in the state manager
NFSv4.1: Handle errors in nfs4_bind_conn_to_session
NFSv4.1: nfs4_bind_conn_to_session should drain the session
NFSv4.1: Don't clobber the seqid if exchange_id returns a confirmed clientid
NFSv4.1: Add DESTROY_CLIENTID
NFSv4.1: Ensure we use the correct credentials for bind_conn_to_session
NFSv4.1: Ensure we use the correct credentials for session create/destroy
NFSv4.1: Move NFSPROC4_CLNT_BIND_CONN_TO_SESSION to the end of the operations
NFSv4.1: Handle NFS4ERR_SEQ_MISORDERED when confirming the lease
NFSv4: When purging the lease, we must clear NFS4CLNT_LEASE_CONFIRM
NFSv4: Clean up the error handling for nfs4_reclaim_lease
NFSv4.1: Exchange ID must use GFP_NOFS allocation mode
nfs41: Use BIND_CONN_TO_SESSION for CB_PATH_DOWN*
nfs4.1: add BIND_CONN_TO_SESSION operation
NFSv4.1 test the mdsthreshold hint parameters
...
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r-- | fs/nfs/proc.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index d6408b6437d..a706b6bcc28 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -178,7 +178,7 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, | |||
178 | } | 178 | } |
179 | 179 | ||
180 | static int | 180 | static int |
181 | nfs_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, struct qstr *name, | 181 | nfs_proc_lookup(struct inode *dir, struct qstr *name, |
182 | struct nfs_fh *fhandle, struct nfs_fattr *fattr) | 182 | struct nfs_fh *fhandle, struct nfs_fattr *fattr) |
183 | { | 183 | { |
184 | struct nfs_diropargs arg = { | 184 | struct nfs_diropargs arg = { |
@@ -640,12 +640,14 @@ nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle, | |||
640 | 640 | ||
641 | static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data) | 641 | static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data) |
642 | { | 642 | { |
643 | struct inode *inode = data->header->inode; | ||
644 | |||
643 | if (nfs_async_handle_expired_key(task)) | 645 | if (nfs_async_handle_expired_key(task)) |
644 | return -EAGAIN; | 646 | return -EAGAIN; |
645 | 647 | ||
646 | nfs_invalidate_atime(data->inode); | 648 | nfs_invalidate_atime(inode); |
647 | if (task->tk_status >= 0) { | 649 | if (task->tk_status >= 0) { |
648 | nfs_refresh_inode(data->inode, data->res.fattr); | 650 | nfs_refresh_inode(inode, data->res.fattr); |
649 | /* Emulate the eof flag, which isn't normally needed in NFSv2 | 651 | /* Emulate the eof flag, which isn't normally needed in NFSv2 |
650 | * as it is guaranteed to always return the file attributes | 652 | * as it is guaranteed to always return the file attributes |
651 | */ | 653 | */ |
@@ -667,11 +669,13 @@ static void nfs_proc_read_rpc_prepare(struct rpc_task *task, struct nfs_read_dat | |||
667 | 669 | ||
668 | static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data) | 670 | static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data) |
669 | { | 671 | { |
672 | struct inode *inode = data->header->inode; | ||
673 | |||
670 | if (nfs_async_handle_expired_key(task)) | 674 | if (nfs_async_handle_expired_key(task)) |
671 | return -EAGAIN; | 675 | return -EAGAIN; |
672 | 676 | ||
673 | if (task->tk_status >= 0) | 677 | if (task->tk_status >= 0) |
674 | nfs_post_op_update_inode_force_wcc(data->inode, data->res.fattr); | 678 | nfs_post_op_update_inode_force_wcc(inode, data->res.fattr); |
675 | return 0; | 679 | return 0; |
676 | } | 680 | } |
677 | 681 | ||
@@ -687,8 +691,13 @@ static void nfs_proc_write_rpc_prepare(struct rpc_task *task, struct nfs_write_d | |||
687 | rpc_call_start(task); | 691 | rpc_call_start(task); |
688 | } | 692 | } |
689 | 693 | ||
694 | static void nfs_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commit_data *data) | ||
695 | { | ||
696 | BUG(); | ||
697 | } | ||
698 | |||
690 | static void | 699 | static void |
691 | nfs_proc_commit_setup(struct nfs_write_data *data, struct rpc_message *msg) | 700 | nfs_proc_commit_setup(struct nfs_commit_data *data, struct rpc_message *msg) |
692 | { | 701 | { |
693 | BUG(); | 702 | BUG(); |
694 | } | 703 | } |
@@ -732,6 +741,7 @@ const struct nfs_rpc_ops nfs_v2_clientops = { | |||
732 | .file_inode_ops = &nfs_file_inode_operations, | 741 | .file_inode_ops = &nfs_file_inode_operations, |
733 | .file_ops = &nfs_file_operations, | 742 | .file_ops = &nfs_file_operations, |
734 | .getroot = nfs_proc_get_root, | 743 | .getroot = nfs_proc_get_root, |
744 | .submount = nfs_submount, | ||
735 | .getattr = nfs_proc_getattr, | 745 | .getattr = nfs_proc_getattr, |
736 | .setattr = nfs_proc_setattr, | 746 | .setattr = nfs_proc_setattr, |
737 | .lookup = nfs_proc_lookup, | 747 | .lookup = nfs_proc_lookup, |
@@ -763,6 +773,7 @@ const struct nfs_rpc_ops nfs_v2_clientops = { | |||
763 | .write_rpc_prepare = nfs_proc_write_rpc_prepare, | 773 | .write_rpc_prepare = nfs_proc_write_rpc_prepare, |
764 | .write_done = nfs_write_done, | 774 | .write_done = nfs_write_done, |
765 | .commit_setup = nfs_proc_commit_setup, | 775 | .commit_setup = nfs_proc_commit_setup, |
776 | .commit_rpc_prepare = nfs_proc_commit_rpc_prepare, | ||
766 | .lock = nfs_proc_lock, | 777 | .lock = nfs_proc_lock, |
767 | .lock_check_bounds = nfs_lock_check_bounds, | 778 | .lock_check_bounds = nfs_lock_check_bounds, |
768 | .close_context = nfs_close_context, | 779 | .close_context = nfs_close_context, |