NFSv4.1: turn off pNFS on ds connection failure
If a data server is unavailable, go through MDS. Mark the deviceid containing the data server as a negative cache entry. Do not try to connect to any data server on a deviceid marked as a negative cache entry. Mark any layout that tries to use the marked deviceid as failed. Inodes with a layout marked as fails will not use the layout for I/O, and will not perform any more layoutgets. Inodes without a layout will still do layoutget, but the layout will get marked immediately. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
ea8eecdd11
commit
568e8c494d
@@ -214,7 +214,9 @@ filelayout_read_pagelist(struct nfs_read_data *data)
|
||||
idx = nfs4_fl_calc_ds_index(lseg, j);
|
||||
ds = nfs4_fl_prepare_ds(lseg, idx);
|
||||
if (!ds) {
|
||||
printk(KERN_ERR "%s: prepare_ds failed, use MDS\n", __func__);
|
||||
/* Either layout fh index faulty, or ds connect failed */
|
||||
set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags);
|
||||
set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags);
|
||||
return PNFS_NOT_ATTEMPTED;
|
||||
}
|
||||
dprintk("%s USE DS:ip %x %hu\n", __func__,
|
||||
|
Reference in New Issue
Block a user