public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: andros@netapp.com
To: iisaman@netapp.com
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch
Date: Thu, 10 Jun 2010 17:26:23 -0400	[thread overview]
Message-ID: <1276205183-14014-2-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1276205183-14014-1-git-send-email-andros@netapp.com>

From: Andy Adamson <andros@netapp.com>

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/write.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 482d41e..a47f03d 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -422,6 +422,17 @@ static void nfs_inode_remove_request(struct nfs_page *req)
 	nfs_clear_request(req);
 	nfs_release_request(req);
 }
+static void
+nfs_mark_request_nopnfs(struct nfs_page *req)
+{
+	struct pnfs_layout_segment *lseg = req->wb_lseg;
+
+	if (req->wb_lseg == NULL)
+		return;
+	req->wb_lseg = NULL;
+	put_lseg(lseg);
+	dprintk(" retry through MDS\n");
+}
 
 static void
 nfs_mark_request_dirty(struct nfs_page *req)
@@ -1463,11 +1474,7 @@ static void nfs_commit_release(void *calldata)
 			(long long)req_offset(req));
 		if (status < 0) {
 			if (req->wb_lseg) {
-				struct pnfs_layout_segment *lseg = req->wb_lseg;
-
-				req->wb_lseg = NULL;
-				put_lseg(lseg);
-				dprintk(" retry through MDS\n");
+				nfs_mark_request_nopnfs(req);
 				nfs_mark_request_dirty(req);
 				goto next;
 			}
@@ -1487,6 +1494,7 @@ static void nfs_commit_release(void *calldata)
 		}
 		/* We have a mismatch. Write the page again */
 		dprintk(" mismatch\n");
+		nfs_mark_request_nopnfs(req);
 		nfs_mark_request_dirty(req);
 	next:
 		nfs_clear_page_tag_locked(req);
-- 
1.6.6


  reply	other threads:[~2010-06-10 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 21:26 SQUASHME-pnfs-submit-write-to-MDS-on-DS-commit-verifier mismatch andros
2010-06-10 21:26 ` andros [this message]
2010-06-11 13:46   ` SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch Fred Isaman

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=1276205183-14014-2-git-send-email-andros@netapp.com \
    --to=andros@netapp.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