From: "J. Bruce Fields" <bfields@redhat.com>
To: Olga Kornievskaia <aglo@umich.edu>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] nfsd4: fix cached replies to solo SEQUENCE compounds
Date: Fri, 20 Oct 2017 13:47:48 -0400 [thread overview]
Message-ID: <20171020174747.GC31637@parsley.fieldses.org> (raw)
In-Reply-To: <CAN-5tyGb9EuYH90LLdDDNZJHWs3RPxK6FvjneKFsM4Yao=Vk0g@mail.gmail.com>
On Thu, Oct 19, 2017 at 05:19:40PM -0400, Olga Kornievskaia wrote:
> On Thu, Oct 19, 2017 at 5:04 PM, Olga Kornievskaia <aglo@umich.edu> wrote:
> > I got this crash upon receiving the SEQUENCE that reused the slot that
> > was used by the ctrl-c-ed COPY.
Yeah, I was being inconsistent about what "NFSD4_SLOT_CACHED" meant--in
replay_matches_cache I'm assuming opcnt and cred are still stored, but I
wasn't storing them in nfsd4_store_cache_entry. Not sure why that
didn't triger in my tests.
Does this help?
--b.
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index ace89bf45a0b..4b2107d11d5e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2296,14 +2296,15 @@ nfsd4_store_cache_entry(struct nfsd4_compoundres *resp)
slot->sl_flags |= NFSD4_SLOT_INITIALIZED;
free_svc_cred(&slot->sl_cred);
+ copy_cred(&slot->sl_cred, &resp->rqstp->rq_cred);
+ slot->sl_opcnt = resp->opcnt;
+ slot->sl_status = resp->cstate.status;
+
if (!nfsd4_cache_this(resp)) {
slot->sl_flags &= ~NFSD4_SLOT_CACHED;
return;
}
slot->sl_flags |= NFSD4_SLOT_CACHED;
- copy_cred(&slot->sl_cred, &resp->rqstp->rq_cred);
- slot->sl_opcnt = resp->opcnt;
- slot->sl_status = resp->cstate.status;
base = resp->cstate.data_offset;
slot->sl_datalen = buf->len - base;
next prev parent reply other threads:[~2017-10-20 17:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 17:07 [PATCH v2] NFSv4.1: Fix up replays of interrupted requests Trond Myklebust
2017-10-16 16:37 ` Olga Kornievskaia
2017-10-16 17:07 ` Olga Kornievskaia
2017-10-16 18:36 ` J. Bruce Fields
2017-10-16 19:20 ` Olga Kornievskaia
2017-10-18 21:23 ` J. Bruce Fields
2017-10-19 17:07 ` Olga Kornievskaia
2017-10-18 21:25 ` [PATCH 1/2] nfsd4: fix cached replies to solo SEQUENCE compounds J. Bruce Fields
2017-10-18 21:25 ` [PATCH 2/2] nfsd4: catch some false session retries J. Bruce Fields
2017-10-19 17:21 ` [PATCH 1/2] nfsd4: fix cached replies to solo SEQUENCE compounds Olga Kornievskaia
2017-10-19 18:17 ` J. Bruce Fields
2017-10-19 18:34 ` Olga Kornievskaia
2017-10-19 20:20 ` J. Bruce Fields
2017-10-19 21:04 ` Olga Kornievskaia
2017-10-19 21:19 ` Olga Kornievskaia
2017-10-20 17:47 ` J. Bruce Fields [this message]
2017-10-20 18:55 ` Olga Kornievskaia
2017-10-20 20:44 ` J. Bruce Fields
2017-10-19 18:33 ` [PATCH v2] NFSv4.1: Fix up replays of interrupted requests Olga Kornievskaia
2017-10-19 18:52 ` Trond Myklebust
2018-05-22 21:28 ` Olga Kornievskaia
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=20171020174747.GC31637@parsley.fieldses.org \
--to=bfields@redhat.com \
--cc=aglo@umich.edu \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/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).