linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: andros@netapp.com
To: bhalevy@panasas.com
Cc: linux-nfs@vger.kernel.org, Fred Isaman <iisaman@netapp.com>
Subject: [PATCH pnfs-submit-wave3 update 2/5] wave3: clean up nfs4_reset_read to match write
Date: Tue,  1 Mar 2011 14:25:31 -0500	[thread overview]
Message-ID: <1299007534-4105-3-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1299007534-4105-2-git-send-email-andros@netapp.com>

From: Fred Isaman <iisaman@netapp.com>

found a bug in write version of this code, make read code
match fix to write

Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 fs/nfs/nfs4filelayout.c |    2 +-
 fs/nfs/nfs4proc.c       |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index c26b655..45b650a 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -142,8 +142,8 @@ static int filelayout_read_done_cb(struct rpc_task *task,
 		dprintk("%s calling restart ds_clp %p ds_clp->cl_session %p\n",
 			__func__, data->ds_clp, data->ds_clp->cl_session);
 		if (reset) {
-			nfs4_reset_read(task, data);
 			filelayout_set_lo_fail(data->lseg);
+			nfs4_reset_read(task, data);
 			clp = NFS_SERVER(data->inode)->nfs_client;
 		}
 		nfs_restart_rpc(task, clp);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a54d8e6..5742a5e 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3112,6 +3112,8 @@ static void nfs4_proc_read_setup(struct nfs_read_data *data, struct rpc_message
 void nfs4_reset_read(struct rpc_task *task, struct nfs_read_data *data)
 {
 	dprintk("%s Reset task for i/o through\n", __func__);
+	put_lseg(data->lseg);
+	data->lseg = NULL;
 	/* offsets will differ in the dense stripe case */
 	data->args.offset = data->mds_offset;
 	data->ds_clp = NULL;
-- 
1.6.2.5


  reply	other threads:[~2011-03-01 19:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 19:25 [PATCH pnfs-submit-wave3 update 0/5] Update tree to match submission andros
2011-03-01 19:25 ` [PATCH pnfs-submit-wave3 update 1/5] wave3: SQUASHME: remove comment to pnfs_pageio_init_read andros
2011-03-01 19:25   ` andros [this message]
2011-03-01 19:25     ` [PATCH pnfs-submit-wave3 update 3/5] wave3: document that we are relying on nfs_initiate_read not failing andros
2011-03-01 19:25       ` [PATCH pnfs-submit-wave3 update 4/5] wave3: clean up lseg after pg_doio function andros
2011-03-01 19:25         ` [PATCH pnfs-submit-wave3 update 5/5] SQUASHME: NFSv4.1: DS only check andros

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=1299007534-4105-3-git-send-email-andros@netapp.com \
    --to=andros@netapp.com \
    --cc=bhalevy@panasas.com \
    --cc=iisaman@netapp.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;
as well as URLs for NNTP newsgroup(s).