NFSv4.1 send layoutreturn to fence disconnected data server
authorAndy Adamson <andros@netapp.com>
Fri, 27 Apr 2012 21:53:50 +0000 (17:53 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 19 May 2012 21:55:31 +0000 (17:55 -0400)
Let the MDS know that you are redirecting I/O from pNFS to MDS.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4filelayout.c
fs/nfs/pnfs.c

index a63062d3882fc3dd40996f70f9149415c47bb458..c6b7c183494714a5976d85bd2e3b4fa69b4e671d 100644 (file)
@@ -186,6 +186,8 @@ static int filelayout_async_handle_error(struct rpc_task *task,
        case -EPIPE:
                dprintk("%s DS connection error %d\n", __func__,
                        task->tk_status);
+               if (!filelayout_test_devid_invalid(devid))
+                       _pnfs_return_layout(state->inode);
                filelayout_mark_devid_invalid(devid);
                rpc_wake_up(&tbl->slot_tbl_waitq);
                /* fall through */
index 16cc1948cb46e898914a52f777339ddba0323031..e48017f67fe20044b3a90f8a5de1a6d899ee829a 100644 (file)
@@ -692,6 +692,7 @@ out:
        dprintk("<-- %s status: %d\n", __func__, status);
        return status;
 }
+EXPORT_SYMBOL_GPL(_pnfs_return_layout);
 
 bool pnfs_roc(struct inode *ino)
 {