diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 308407205e6c..768514dc0c4c 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3570,6 +3570,35 @@ ssize_t nfs4_listxattr(struct dentry *dentry, char *buf, size_t buflen) | |||
3570 | return len; | 3570 | return len; |
3571 | } | 3571 | } |
3572 | 3572 | ||
3573 | int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry, | ||
3574 | struct nfs_fs_locations *fs_locations, struct page *page) | ||
3575 | { | ||
3576 | struct nfs_server *server = NFS_SERVER(dir); | ||
3577 | u32 bitmask[2] = { | ||
3578 | [0] = server->attr_bitmask[0] | FATTR4_WORD0_FS_LOCATIONS, | ||
3579 | [1] = server->attr_bitmask[1], | ||
3580 | }; | ||
3581 | struct nfs4_fs_locations_arg args = { | ||
3582 | .dir_fh = NFS_FH(dir), | ||
3583 | .name = &dentry->d_name, | ||
3584 | .page = page, | ||
3585 | .bitmask = bitmask, | ||
3586 | }; | ||
3587 | struct rpc_message msg = { | ||
3588 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_FS_LOCATIONS], | ||
3589 | .rpc_argp = &args, | ||
3590 | .rpc_resp = &fs_locations, | ||
3591 | }; | ||
3592 | int status; | ||
3593 | |||
3594 | dprintk("%s: start\n", __FUNCTION__); | ||
3595 | fs_locations->fattr.valid = 0; | ||
3596 | fs_locations->server = server; | ||
3597 | status = rpc_call_sync(server->client, &msg, 0); | ||
3598 | dprintk("%s: returned status = %d\n", __FUNCTION__, status); | ||
3599 | return status; | ||
3600 | } | ||
3601 | |||
3573 | struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops = { | 3602 | struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops = { |
3574 | .recover_open = nfs4_open_reclaim, | 3603 | .recover_open = nfs4_open_reclaim, |
3575 | .recover_lock = nfs4_lock_reclaim, | 3604 | .recover_lock = nfs4_lock_reclaim, |