diff options
author | Fred Isaman <iisaman@netapp.com> | 2011-03-03 10:13:47 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-11 15:38:44 -0500 |
commit | a69aef1496726ed88386dad65abfcc8cd3195304 (patch) | |
tree | 66766c9eed54e6dc7ddf9ecaf8765a7bc833685e /fs/nfs/nfs4proc.c | |
parent | 7ffd10640dc008f6d5a375bd6450755745c63c7d (diff) |
NFSv4.1: pnfs filelayout driver write
Allows the pnfs filelayout driver to write to the data servers.
Note that COMMIT to data servers will be implemented in a future
patch. To avoid improper behavior, for the moment any WRITE to a data
server that would also require a COMMIT to the data server is sent
NFS_FILE_SYNC.
Signed-off-by: Andy Adamson <andros@citi.umich.edu>
Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com>
Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Mingyang Guo <guomingyang@nrchpc.ac.cn>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index da902123ec53..7b4b9f3e9842 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3145,6 +3145,23 @@ static int nfs4_write_done(struct rpc_task *task, struct nfs_write_data *data) | |||
3145 | return data->write_done_cb(task, data); | 3145 | return data->write_done_cb(task, data); |
3146 | } | 3146 | } |
3147 | 3147 | ||
3148 | /* Reset the the nfs_write_data to send the write to the MDS. */ | ||
3149 | void nfs4_reset_write(struct rpc_task *task, struct nfs_write_data *data) | ||
3150 | { | ||
3151 | dprintk("%s Reset task for i/o through\n", __func__); | ||
3152 | put_lseg(data->lseg); | ||
3153 | data->lseg = NULL; | ||
3154 | data->ds_clp = NULL; | ||
3155 | data->write_done_cb = nfs4_write_done_cb; | ||
3156 | data->args.fh = NFS_FH(data->inode); | ||
3157 | data->args.bitmask = data->res.server->cache_consistency_bitmask; | ||
3158 | data->args.offset = data->mds_offset; | ||
3159 | data->res.fattr = &data->fattr; | ||
3160 | task->tk_ops = data->mds_ops; | ||
3161 | rpc_task_reset_client(task, NFS_CLIENT(data->inode)); | ||
3162 | } | ||
3163 | EXPORT_SYMBOL_GPL(nfs4_reset_write); | ||
3164 | |||
3148 | static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) | 3165 | static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) |
3149 | { | 3166 | { |
3150 | struct nfs_server *server = NFS_SERVER(data->inode); | 3167 | struct nfs_server *server = NFS_SERVER(data->inode); |