From: Dave Wysochanski <dwysocha@redhat.com>
To: Trond Myklebust <trondmy@hammerspace.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] SUNRPC: Fix possible autodisconnect during connect due to stale last_used
Date: Wed, 26 Jun 2019 16:14:24 -0400 [thread overview]
Message-ID: <2b8a79f46c23e40c8bf60de4aaf37bd140c3f069.camel@redhat.com> (raw)
In-Reply-To: <566e3eb7b501d48a2989461c316b66c03c56b129.camel@hammerspace.com>
On Wed, 2019-06-26 at 20:11 +0000, Trond Myklebust wrote:
> On Wed, 2019-06-26 at 15:50 -0400, Dave Wysochanski wrote:
> > When a connection is successful ensure last_used is updated before
> > calling
> > xprt_schedule_autodisconnect inside xprt_unlock_connect. This
> > avoids
> > a
> > possible xprt_autoclose firing immediately after connect sequence
> > due
> > to
> > an old value of last_used given to mod_timer in
> > xprt_schedule_autodisconnect.
> >
> > Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
> > ---
> > net/sunrpc/xprt.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
> > index f6c82b1..fceaede 100644
> > --- a/net/sunrpc/xprt.c
> > +++ b/net/sunrpc/xprt.c
> > @@ -800,6 +800,7 @@ void xprt_unlock_connect(struct rpc_xprt *xprt,
> > void *cookie)
> > goto out;
> > xprt->snd_task =NULL;
> > xprt->ops->release_xprt(xprt, NULL);
> > + xprt->last_used = jiffies;
> > xprt_schedule_autodisconnect(xprt);
> > out:
> > spin_unlock_bh(&xprt->transport_lock);
>
> Let's just move that line into xprt_schedule_autodisconnect(), since
> in
> practice this means all callers are doing the same thing.
>
>
Will do and resubmit - thanks!
next prev parent reply other threads:[~2019-06-26 20:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 19:50 [PATCH] SUNRPC: Fix possible autodisconnect during connect due to stale last_used Dave Wysochanski
2019-06-26 20:11 ` Trond Myklebust
2019-06-26 20:14 ` Dave Wysochanski [this message]
2019-06-26 20:30 ` [PATCH] SUNRPC: Fix possible autodisconnect during connect due to old last_used Dave Wysochanski
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=2b8a79f46c23e40c8bf60de4aaf37bd140c3f069.camel@redhat.com \
--to=dwysocha@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@hammerspace.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