Skip to contentSkip to conversation

SQUASHME-pnfs-submit-write-to-MDS-on-DS-commit-verifier mismatch

DISCUSSION [email protected] 2 participants 3 messages Jun 10, 2010 – Jun 11, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This is an addition to Fred's "[PATCH 0/24] LAYOUTGET invocation" patch set, and applies on top of it. In particular, it fixes the verifier mismatch case in nfs_commit_release. The bad status case is handled in Fred's patch:

"[PATCH 21/24] pnfs-submit:filelayout: rewrite filelayout_commit to use new API"

Fred - please consider adding this to your patch set submission.

SQUASHME-pnfs-submit-write-to-MDS-on-DS-commit-verif.patch

-->Andy

#1 lore raw

SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch

From: Andy Adamson <[email protected]>

---
 fs/nfs/write.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)
fs/nfs/write.c +13 -5
index 482d41e..a47f03d 100644
@@ -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);
Signature · 1 line
1.6.6
#2 lore raw

Re: SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch

Thanks Andy. I've squashed this into my just submitted patchset.

=46red

fs/nfs/write.c static void nfs_inode_remove_request(struct nfs_=

Quoted 12 lines · On Thu, Jun 10, 2010 at 5:26 PM, <[email protected]> wrote:

From: Andy Adamson <[email protected]>

---
=A0fs/nfs/write.c | =A0 18 +++++++++++++----- =A01 files changed, 13 insertions(+), 5 deletions(-)

fs/nfs/write.c +0 -0
index 482d41e..a47f03d 100644
@@ -422,6 +422,17 @@ static void nfs_inode_remove_request(struct nfs_=

page *req)

Quoted 18 lines
fs/nfs/write.c +11 -0
 =A0 =A0 =A0 =A0nfs_clear_request(req);
 =A0 =A0 =A0 =A0nfs_release_request(req);
 =A0}
+static void
+nfs_mark_request_nopnfs(struct nfs_page *req)
+{
+ =A0 =A0 =A0 struct pnfs_layout_segment *lseg =3D req->wb_lseg;
+
+ =A0 =A0 =A0 if (req->wb_lseg =3D=3D NULL)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
+ =A0 =A0 =A0 req->wb_lseg =3D NULL;
+ =A0 =A0 =A0 put_lseg(lseg);
+ =A0 =A0 =A0 dprintk(" retry through MDS\n");
+}
 

=A0static void
=A0nfs_mark_request_dirty(struct nfs_page *req)

fs/nfs/write.c +0 -0
@@ -1463,11 +1474,7 @@ static void nfs_commit_release(void *calldata)
Quoted 1 line

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(long long)req_offset(=

req));

Quoted 3 lines

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (status < 0) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (req->wb_lseg) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct =

pnfs_layout_segment *lseg =3D req->wb_lseg;

Quoted 2 lines

-
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 req->wb=

_lseg =3D NULL;

Quoted 1 line

- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 put_lse=

g(lseg);

Quoted 1 line

- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dprintk=

(" retry through MDS\n");

Quoted 1 line

+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 nfs_mar=

k_request_nopnfs(req);

Quoted 1 line

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nfs_ma=

rk_request_dirty(req);

Quoted 1 line

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto n=

ext;

Quoted 4 lines

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}

fs/nfs/write.c +0 -0
@@ -1487,6 +1494,7 @@ static void nfs_commit_release(void *calldata)
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* We have a mismatch. Write the page =

again */

Quoted 10 lines

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dprintk(" mismatch\n");
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 nfs_mark_request_nopnfs(req); =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nfs_mark_request_dirty(req); =A0 =A0 =A0 =A0next:
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nfs_clear_page_tag_locked(req); --
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" =

in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at =A0http://vger.kernel.org/majordomo-info.html