pNFS/flexfiles: delete deviceid, don't mark inactive
Instead of marking a device inactive, remove it from the cache entirely. Flexfiles has a way to report errors back to the server, so we don't want to stop devices from being tried again for 120 seconds. Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
187e593d27
commit
1c48cee83b
|
@ -1126,7 +1126,8 @@ static int ff_layout_async_handle_error_v4(struct rpc_task *task,
|
||||||
case -EPIPE:
|
case -EPIPE:
|
||||||
dprintk("%s DS connection error %d\n", __func__,
|
dprintk("%s DS connection error %d\n", __func__,
|
||||||
task->tk_status);
|
task->tk_status);
|
||||||
nfs4_mark_deviceid_unavailable(devid);
|
nfs4_delete_deviceid(devid->ld, devid->nfs_client,
|
||||||
|
&devid->deviceid);
|
||||||
rpc_wake_up(&tbl->slot_tbl_waitq);
|
rpc_wake_up(&tbl->slot_tbl_waitq);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
|
@ -1175,7 +1176,8 @@ static int ff_layout_async_handle_error_v3(struct rpc_task *task,
|
||||||
default:
|
default:
|
||||||
dprintk("%s DS connection error %d\n", __func__,
|
dprintk("%s DS connection error %d\n", __func__,
|
||||||
task->tk_status);
|
task->tk_status);
|
||||||
nfs4_mark_deviceid_unavailable(devid);
|
nfs4_delete_deviceid(devid->ld, devid->nfs_client,
|
||||||
|
&devid->deviceid);
|
||||||
}
|
}
|
||||||
/* FIXME: Need to prevent infinite looping here. */
|
/* FIXME: Need to prevent infinite looping here. */
|
||||||
return -NFS4ERR_RESET_TO_PNFS;
|
return -NFS4ERR_RESET_TO_PNFS;
|
||||||
|
|
|
@ -177,7 +177,7 @@ out_err:
|
||||||
static void ff_layout_mark_devid_invalid(struct pnfs_layout_segment *lseg,
|
static void ff_layout_mark_devid_invalid(struct pnfs_layout_segment *lseg,
|
||||||
struct nfs4_deviceid_node *devid)
|
struct nfs4_deviceid_node *devid)
|
||||||
{
|
{
|
||||||
nfs4_mark_deviceid_unavailable(devid);
|
nfs4_delete_deviceid(devid->ld, devid->nfs_client, &devid->deviceid);
|
||||||
if (!ff_layout_has_available_ds(lseg))
|
if (!ff_layout_has_available_ds(lseg))
|
||||||
pnfs_error_mark_layout_for_return(lseg->pls_layout->plh_inode,
|
pnfs_error_mark_layout_for_return(lseg->pls_layout->plh_inode,
|
||||||
lseg);
|
lseg);
|
||||||
|
|
Loading…
Reference in New Issue