summaryrefslogtreecommitdiff
path: root/fs/nfs/flexfilelayout/flexfilelayoutdev.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-02-26 21:52:50 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-03-02 06:37:38 +0300
commit17aaec816751d77e443dee66d11d9e6ac00ac95c (patch)
treec3f9779e3ff652c1cbe0e9ec4cd046a607106a88 /fs/nfs/flexfilelayout/flexfilelayoutdev.c
parentd082d4b5a0ddf56d9a63eae66119f2ef53783d5f (diff)
downloadlinux-17aaec816751d77e443dee66d11d9e6ac00ac95c.tar.xz
NFS/flexfiles: Don't invalidate DS deviceids for being unresponsive
If the DS is unresponsive, we want to just mark it as such, while reporting the errors. If the server later returns the same deviceid in a new layout, then we don't want to have to look it up again. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayoutdev.c')
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayoutdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index 92efb5692eb3..7fd92226e4b9 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -186,7 +186,7 @@ out_err:
static void ff_layout_mark_devid_invalid(struct pnfs_layout_segment *lseg,
struct nfs4_deviceid_node *devid)
{
- nfs4_delete_deviceid(devid->ld, devid->nfs_client, &devid->deviceid);
+ nfs4_mark_deviceid_unavailable(devid);
if (!ff_layout_has_available_ds(lseg))
pnfs_error_mark_layout_for_return(lseg->pls_layout->plh_inode,
lseg);
@@ -605,7 +605,7 @@ static bool ff_read_layout_has_available_ds(struct pnfs_layout_segment *lseg)
if (IS_ERR(mirror->mirror_ds))
continue;
devid = &mirror->mirror_ds->id_node;
- if (!ff_layout_test_devid_unavailable(devid))
+ if (!nfs4_test_deviceid_unavailable(devid))
return true;
}
}
@@ -626,7 +626,7 @@ static bool ff_rw_layout_has_available_ds(struct pnfs_layout_segment *lseg)
if (!mirror->mirror_ds)
continue;
devid = &mirror->mirror_ds->id_node;
- if (ff_layout_test_devid_unavailable(devid))
+ if (nfs4_test_deviceid_unavailable(devid))
return false;
}