]> git.karo-electronics.de Git - linux-beck.git/commitdiff
NFSv4.1/NFSv3: Add pNFS callbacks for nfs3_(read|write|commit)_done()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 22 Jun 2014 16:55:11 +0000 (12:55 -0400)
committerTom Haynes <loghyr@primarydata.com>
Tue, 3 Feb 2015 19:06:37 +0000 (11:06 -0800)
Enable pNFS callbacks to allow flex files to work correctly with a
NFSv3-enabled data server.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs3proc.c

index 524f9f837408253ffc25ade7be5de9b65dc06b30..78e557c3ab87d014694e6e4098faefb20553f579 100644 (file)
@@ -800,6 +800,9 @@ static int nfs3_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
 {
        struct inode *inode = hdr->inode;
 
+       if (hdr->pgio_done_cb != NULL)
+               return hdr->pgio_done_cb(task, hdr);
+
        if (nfs3_async_handle_jukebox(task, inode))
                return -EAGAIN;
 
@@ -825,6 +828,9 @@ static int nfs3_write_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
 {
        struct inode *inode = hdr->inode;
 
+       if (hdr->pgio_done_cb != NULL)
+               return hdr->pgio_done_cb(task, hdr);
+
        if (nfs3_async_handle_jukebox(task, inode))
                return -EAGAIN;
        if (task->tk_status >= 0)
@@ -845,6 +851,9 @@ static void nfs3_proc_commit_rpc_prepare(struct rpc_task *task, struct nfs_commi
 
 static int nfs3_commit_done(struct rpc_task *task, struct nfs_commit_data *data)
 {
+       if (data->commit_done_cb != NULL)
+               return data->commit_done_cb(task, data);
+
        if (nfs3_async_handle_jukebox(task, data->inode))
                return -EAGAIN;
        nfs_refresh_inode(data->inode, data->res.fattr);