From: andros@netapp.com
To: bhalevy@panasas.com
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: [PATCH 02/17] SQUASHME fix filelayout_set_lo_fail logic
Date: Thu, 10 Feb 2011 20:52:35 -0500 [thread overview]
Message-ID: <1297389170-26702-3-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1297389170-26702-2-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
Just use lseg iomode.
squash into pnfs-submit wave3 filelayout read done
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/nfs4filelayout.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 777d78b..05fcc6a 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -99,12 +99,12 @@ filelayout_get_dserver_offset(struct pnfs_layout_segment *lseg, loff_t offset)
/* For data server errors we don't recover from */
static void
-filelayout_set_lo_fail(struct pnfs_layout_segment *lseg, fmode_t mode)
+filelayout_set_lo_fail(struct pnfs_layout_segment *lseg)
{
- if (mode & FMODE_WRITE) {
+ if (lseg->pls_range.iomode == IOMODE_RW) {
dprintk("%s Setting layout IOMODE_RW fail bit\n", __func__);
set_bit(lo_fail_bit(IOMODE_RW), &lseg->pls_layout->plh_flags);
- } else if (mode & FMODE_READ) {
+ } else {
dprintk("%s Setting layout IOMODE_READ fail bit\n", __func__);
set_bit(lo_fail_bit(IOMODE_READ), &lseg->pls_layout->plh_flags);
}
@@ -143,9 +143,8 @@ static int filelayout_async_handle_error(struct rpc_task *task,
task->tk_status = 0;
return -EAGAIN;
default:
- dprintk("%s DS error %d\n", __func__, task->tk_status);
- /* Layout marked as failed by pnfs_check_io_status.
- * Retry I/O through the MDS */
+ dprintk("%s DS error. Retry through MDS %d\n", __func__,
+ task->tk_status);
*reset = 1;
task->tk_status = 0;
return -EAGAIN;
@@ -168,8 +167,7 @@ static int filelayout_read_done_cb(struct rpc_task *task,
__func__, data->ds_clp, data->ds_clp->cl_session);
if (reset) {
nfs4_reset_read(task, data);
- filelayout_set_lo_fail(data->lseg,
- data->args.context->state->state);
+ filelayout_set_lo_fail(data->lseg);
clp = NFS_SERVER(data->inode)->nfs_client;
}
nfs_restart_rpc(task, clp);
--
1.6.6
next prev parent reply other threads:[~2011-02-11 18:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 1:52 [PATCH 0/17] pnfs-submit-wave3-rev3 bug fixes and cleanup andros
2011-02-11 1:52 ` [PATCH 01/17] SQUASHME pnfs-submit wave3 fix nfs4_ds_connect bug andros
2011-02-11 1:52 ` andros [this message]
2011-02-11 1:52 ` [PATCH 03/17] SQUASHME rename orig_offset to mds_offset andros
2011-02-11 1:52 ` [PATCH 04/17] SQUASHME rename nfs_read_data call_ops ONE andros
2011-02-11 1:52 ` [PATCH 05/17] SQUASHME rename nfs_read_data call_ops TWO andros
2011-02-11 1:52 ` [PATCH 06/17] SQUASHME rename nfs_read_data call_ops THREE andros
2011-02-11 1:52 ` [PATCH 07/17] SQUASHME remove reset mds_offset from filelayout_rpc_call_done andros
2011-02-11 1:52 ` [PATCH 08/17] SQUASHME reset offset to mds_offset andros
2011-02-11 1:52 ` [PATCH 09/17] SQUASHME cleanup read_pagelist declaration and comment andros
2011-02-11 1:52 ` [PATCH 10/17] SQUASHME just return ds in nfs4_fl_prepare_ds andros
2011-02-11 1:52 ` [PATCH 11/17] SQUASHME update pnfs_try_to_read_data comment andros
2011-02-11 1:52 ` [PATCH 12/17] SQUASHME remove filelayout_async_handle_error comment andros
2011-02-11 1:52 ` [PATCH 13/17] SQUASHME update nfs4_ds_connect comment andros
2011-02-11 1:52 ` [PATCH 14/17] SQUASHME don't remove space andros
2011-02-11 1:52 ` [PATCH 15/17] SQUASHME set non V41 pg_test to NULL andros
2011-02-11 1:52 ` [PATCH 16/17] SQUASHME restore lost put_lseg code andros
2011-02-11 1:52 ` [PATCH 17/17] SQUASHME put_layout_hdr can remove nfsi->layout andros
2011-02-13 5:17 ` [PATCH 0/17] pnfs-submit-wave3-rev3 bug fixes and cleanup Benny Halevy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297389170-26702-3-git-send-email-andros@netapp.com \
--to=andros@netapp.com \
--cc=bhalevy@panasas.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox