From: Andy Adamson Date: Fri, 27 Apr 2012 21:53:50 +0000 (-0400) Subject: NFSv4.1 send layoutreturn to fence disconnected data server X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0a57cdac3fb9d249f4fbbc745c01b9292ef8c1b7;p=linux-beck.git NFSv4.1 send layoutreturn to fence disconnected data server Let the MDS know that you are redirecting I/O from pNFS to MDS. Signed-off-by: Andy Adamson Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index a63062d3882f..c6b7c1834947 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -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 */ diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 16cc1948cb46..e48017f67fe2 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -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) {