* SQUASHME-pnfs-submit-write-to-MDS-on-DS-commit-verifier mismatch
@ 2010-06-10 21:26 andros
2010-06-10 21:26 ` SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch andros
0 siblings, 1 reply; 3+ messages in thread
From: andros @ 2010-06-10 21:26 UTC (permalink / raw)
To: iisaman; +Cc: linux-nfs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch
2010-06-10 21:26 SQUASHME-pnfs-submit-write-to-MDS-on-DS-commit-verifier mismatch andros
@ 2010-06-10 21:26 ` andros
2010-06-11 13:46 ` Fred Isaman
0 siblings, 1 reply; 3+ messages in thread
From: andros @ 2010-06-10 21:26 UTC (permalink / raw)
To: iisaman; +Cc: linux-nfs, Andy Adamson
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch
2010-06-10 21:26 ` SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch andros
@ 2010-06-11 13:46 ` Fred Isaman
0 siblings, 0 replies; 3+ messages in thread
From: Fred Isaman @ 2010-06-11 13:46 UTC (permalink / raw)
To: andros; +Cc: iisaman, linux-nfs
Thanks Andy. I've squashed this into my just submitted patchset.
=46red
On Thu, Jun 10, 2010 at 5:26 PM, <andros@netapp.com> wrote:
> From: Andy Adamson <andros@netapp.com>
>
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
> =A0fs/nfs/write.c | =A0 18 +++++++++++++-----
> =A01 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)
> =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)
> @@ -1463,11 +1474,7 @@ static void nfs_commit_release(void *calldata)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(long long)req_offset(=
req));
> =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;
> -
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 req->wb=
_lseg =3D NULL;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 put_lse=
g(lseg);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dprintk=
(" retry through MDS\n");
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 nfs_mar=
k_request_nopnfs(req);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nfs_ma=
rk_request_dirty(req);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto n=
ext;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> @@ -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 */
> =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
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-11 13:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10 21:26 SQUASHME-pnfs-submit-write-to-MDS-on-DS-commit-verifier mismatch andros
2010-06-10 21:26 ` SQUASHME pnfs-submit: write to MDS on DS commit verifier mismatch andros
2010-06-11 13:46 ` Fred Isaman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox