From: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
To: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 11/18] cifs: handle cancelled requests better
Date: Thu, 06 Jan 2011 12:39:15 +0530 [thread overview]
Message-ID: <4D256A9B.90506@suse.de> (raw)
In-Reply-To: <1293417006-6417-12-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 12/27/2010 07:59 AM, Jeff Layton wrote:
> Currently, when a request is cancelled via signal, we delete the mid
> immediately. If the request was already transmitted however, the client
> is still likely to receive a response. When it does, it won't recognize
> it however and will pop a printk.
>
> It's also a little dangerous to just delete the mid entry like this. We
> may end up reusing that mid. If we do then we could potentially get the
> response from the first request confused with the later one.
>
> Prevent the reuse of mids by marking them as cancelled and keeping them
> on the pending_mid_q list. If the reply comes in, we'll delete it from
> the list then. If it never comes, then we'll delete it at reconnect
> or when cifsd comes down.
>
> Reviewed-by: Pavel Shilovsky <piastryyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
> fs/cifs/transport.c | 43 ++++++++++++++++++++++++++++++++++++-------
> 1 files changed, 36 insertions(+), 7 deletions(-)
>
Looks good to me.
Reviewed-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
next prev parent reply other threads:[~2011-01-06 7:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-27 2:29 [PATCH 00/18] cifs: overhaul request timeout behavior in CIFS (try #4) Jeff Layton
[not found] ` <1293417006-6417-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-12-27 2:29 ` [PATCH 01/18] cifs: don't fail writepages on -EAGAIN errors Jeff Layton
2010-12-27 2:29 ` [PATCH 02/18] cifs: no need to mark smb_ses_list as cifs_demultiplex_thread is exiting Jeff Layton
2010-12-27 2:29 ` [PATCH 03/18] cifs: make wait_for_free_request take a TCP_Server_Info pointer Jeff Layton
2010-12-27 2:29 ` [PATCH 04/18] cifs: clean up accesses to midCount Jeff Layton
2010-12-27 2:29 ` [PATCH 05/18] cifs: move locked sections out of DeleteMidQEntry and AllocMidQEntry Jeff Layton
2010-12-27 2:29 ` [PATCH 06/18] cifs: move mid result processing into common function Jeff Layton
2010-12-27 2:29 ` [PATCH 07/18] cifs: wait indefinitely for responses Jeff Layton
2010-12-27 2:29 ` [PATCH 08/18] cifs: don't reconnect server when we don't get a response Jeff Layton
2010-12-27 2:29 ` [PATCH 09/18] cifs: clean up sync_mid_result Jeff Layton
[not found] ` <1293417006-6417-10-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-12-27 15:53 ` Pavel Shilovsky
2011-01-06 6:57 ` Suresh Jayaraman
2010-12-27 2:29 ` [PATCH 10/18] cifs: allow for different handling of received response Jeff Layton
2010-12-27 2:29 ` [PATCH 11/18] cifs: handle cancelled requests better Jeff Layton
[not found] ` <1293417006-6417-12-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-01-06 7:09 ` Suresh Jayaraman [this message]
2010-12-27 2:30 ` [PATCH 12/18] cifs: add cifs_call_async Jeff Layton
2010-12-27 2:30 ` [PATCH 13/18] cifs: add ability to send an echo request Jeff Layton
2010-12-27 2:30 ` [PATCH 14/18] cifs: set up recurring workqueue job to do SMB echo requests Jeff Layton
2010-12-27 2:30 ` [PATCH 15/18] cifs: reconnect unresponsive servers Jeff Layton
[not found] ` <1293417006-6417-16-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-12-27 15:58 ` Pavel Shilovsky
2011-01-06 7:16 ` Suresh Jayaraman
2010-12-27 2:30 ` [PATCH 16/18] cifs: remove code for setting timeouts on requests Jeff Layton
2010-12-27 2:30 ` [PATCH 17/18] cifs: mangle existing header for SMB_COM_NT_CANCEL Jeff Layton
2010-12-27 2:30 ` [PATCH 18/18] cifs: send an NT_CANCEL request when a process is signalled Jeff Layton
-- strict thread matches above, loose matches on Subject: below --
2010-12-17 15:07 [PATCH 00/18] cifs: overhaul request timeout behavior in CIFS (try #3) Jeff Layton
[not found] ` <1292598497-29796-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-12-17 15:08 ` [PATCH 11/18] cifs: handle cancelled requests better Jeff Layton
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=4D256A9B.90506@suse.de \
--to=sjayaraman-l3a5bk7wagm@public.gmane.org \
--cc=jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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