Skip to content

Commit 50379c9

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFSv4/pNFS: Handle server reboots in pnfs_poc_release()
If the server reboots, then handle it by deferring the layout return. Signed-off-by: Trond Myklebust <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 6e7be9e commit 50379c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fs/nfs/pnfs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,15 +1586,17 @@ int pnfs_roc_done(struct rpc_task *task, struct nfs4_layoutreturn_args **argpp,
15861586
}
15871587

15881588
void pnfs_roc_release(struct nfs4_layoutreturn_args *args,
1589-
struct nfs4_layoutreturn_res *res,
1590-
int ret)
1589+
struct nfs4_layoutreturn_res *res, int ret)
15911590
{
15921591
struct pnfs_layout_hdr *lo = args->layout;
15931592
struct inode *inode = args->inode;
15941593
const nfs4_stateid *res_stateid = NULL;
15951594
struct nfs4_xdr_opaque_data *ld_private = args->ld_private;
15961595

15971596
switch (ret) {
1597+
case -NFS4ERR_BADSESSION:
1598+
case -NFS4ERR_DEADSESSION:
1599+
case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION:
15981600
case -NFS4ERR_NOMATCHING_LAYOUT:
15991601
spin_lock(&inode->i_lock);
16001602
pnfs_layoutreturn_retry_later_locked(lo, &args->stateid,

0 commit comments

Comments
 (0)