aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4filelayout.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2012-04-27 17:53:42 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-19 17:54:18 -0400
commit554d458d79fa34acc73bc5128ba7bbf6b3007dfd (patch)
treee3b433888cfb494e234bb0a068563591f83cdcc2 /fs/nfs/nfs4filelayout.c
parente73e6c9e85ed91187c1d21cb9238e86a116bf3db (diff)
NFSv4.1: cleanup filelayout invalid deviceid handling
Move the invalid deviceid test into nfs4_fl_prepare_ds, called by the filelayout read, write, and commit routines. NFS4_DEVICE_ID_NEG_ENTRY is no longer needed. Remove redundant printk's - filelayout_mark_devid_invalid prints a KERN_WARNING. An invalid device prevents pNFS io. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r--fs/nfs/nfs4filelayout.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 80a63f6d9e14..eebec9a7641a 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -389,9 +389,6 @@ filelayout_read_pagelist(struct nfs_read_data *data)
389 __func__, hdr->inode->i_ino, 389 __func__, hdr->inode->i_ino,
390 data->args.pgbase, (size_t)data->args.count, offset); 390 data->args.pgbase, (size_t)data->args.count, offset);
391 391
392 if (test_bit(NFS_DEVICEID_INVALID, &FILELAYOUT_DEVID_NODE(lseg)->flags))
393 return PNFS_NOT_ATTEMPTED;
394
395 /* Retrieve the correct rpc_client for the byte range */ 392 /* Retrieve the correct rpc_client for the byte range */
396 j = nfs4_fl_calc_j_index(lseg, offset); 393 j = nfs4_fl_calc_j_index(lseg, offset);
397 idx = nfs4_fl_calc_ds_index(lseg, j); 394 idx = nfs4_fl_calc_ds_index(lseg, j);
@@ -432,16 +429,11 @@ filelayout_write_pagelist(struct nfs_write_data *data, int sync)
432 struct nfs_fh *fh; 429 struct nfs_fh *fh;
433 int status; 430 int status;
434 431
435 if (test_bit(NFS_DEVICEID_INVALID, &FILELAYOUT_DEVID_NODE(lseg)->flags))
436 return PNFS_NOT_ATTEMPTED;
437
438 /* Retrieve the correct rpc_client for the byte range */ 432 /* Retrieve the correct rpc_client for the byte range */
439 j = nfs4_fl_calc_j_index(lseg, offset); 433 j = nfs4_fl_calc_j_index(lseg, offset);
440 idx = nfs4_fl_calc_ds_index(lseg, j); 434 idx = nfs4_fl_calc_ds_index(lseg, j);
441 ds = nfs4_fl_prepare_ds(lseg, idx); 435 ds = nfs4_fl_prepare_ds(lseg, idx);
442 if (!ds) { 436 if (!ds) {
443 printk(KERN_ERR "NFS: %s: prepare_ds failed, use MDS\n",
444 __func__);
445 set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags); 437 set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags);
446 set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags); 438 set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags);
447 return PNFS_NOT_ATTEMPTED; 439 return PNFS_NOT_ATTEMPTED;
@@ -977,8 +969,6 @@ static int filelayout_initiate_commit(struct nfs_commit_data *data, int how)
977 idx = calc_ds_index_from_commit(lseg, data->ds_commit_index); 969 idx = calc_ds_index_from_commit(lseg, data->ds_commit_index);
978 ds = nfs4_fl_prepare_ds(lseg, idx); 970 ds = nfs4_fl_prepare_ds(lseg, idx);
979 if (!ds) { 971 if (!ds) {
980 printk(KERN_ERR "NFS: %s: prepare_ds failed, use MDS\n",
981 __func__);
982 set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags); 972 set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags);
983 set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags); 973 set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags);
984 prepare_to_resend_writes(data); 974 prepare_to_resend_writes(data);