All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, devel@openvz.org,
	linux-kernel@vger.kernel.org, jlayton@redhat.com
Subject: [PATCH v2 4/4] SUNRPC: PipeFS MOUNT notification optimization for dying clients
Date: Tue, 11 Jun 2013 18:39:32 +0400	[thread overview]
Message-ID: <20130611143932.16046.52825.stgit@localhost.localdomain> (raw)
In-Reply-To: <20130611143725.16046.17279.stgit@localhost.localdomain>

Not need to create pipes for dying client. So just skip them.

Note: we can safely dereference the client structure, because notification
caller is holding sn->pipefs_sb_lock.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: stable@vger.kernel.org
---
 net/sunrpc/clnt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index b4f1711..f0339ae 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -177,6 +177,8 @@ static inline int rpc_clnt_skip_event(struct rpc_clnt *clnt, unsigned long event
 	if (((event == RPC_PIPEFS_MOUNT) && clnt->cl_dentry) ||
 	    ((event == RPC_PIPEFS_UMOUNT) && !clnt->cl_dentry))
 		return 1;
+	if ((event == RPC_PIPEFS_MOUNT) && atomic_read(&clnt->cl_count) == 0)
+		return 1;
 	return 0;
 }
 


      parent reply	other threads:[~2013-06-11 14:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 14:39 [PATCH v2 0/4] SUNRPC: PipeFS races fixes Stanislav Kinsbursky
2013-06-11 14:39 ` [PATCH v2 1/4] SUNRPC: split client creation routine into setup and registration Stanislav Kinsbursky
2013-06-11 14:39 ` [PATCH v2 2/4] SUNRPC: fix races on PipeFS MOUNT notifications Stanislav Kinsbursky
2013-06-17 18:20   ` Myklebust, Trond
2013-06-18  6:41     ` Stanislav Kinsbursky
2013-06-11 14:39 ` [PATCH v2 3/4] SUNRPC: fix races on PipeFS UMOUNT notifications Stanislav Kinsbursky
2013-06-11 14:39 ` Stanislav Kinsbursky [this message]

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=20130611143932.16046.52825.stgit@localhost.localdomain \
    --to=skinsbursky@parallels.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=devel@openvz.org \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.