NFSv4.1 return the LAYOUT for each file with failed DS connection I/O
authorAndy Adamson <andros@netapp.com>
Wed, 20 Jun 2012 19:03:31 +0000 (15:03 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 16 Jul 2012 18:36:52 +0000 (14:36 -0400)
First mark the deviceid invalid to prevent any future use. Then fence all
files involved in I/O to a DS with a connection error by sending a
LAYOUTRETURN.

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

index 85b70639921bd2d4ccb39b003bdac5a44166d487..26b96de831ea71adcd5dcd99fb7ab63468a9ebdb 100644 (file)
@@ -205,9 +205,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(inode);
                filelayout_mark_devid_invalid(devid);
+               _pnfs_return_layout(inode);
                rpc_wake_up(&tbl->slot_tbl_waitq);
                nfs4_ds_disconnect(clp);
                /* fall through */