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 v3 4/4] SUNRPC: PipeFS MOUNT notification optimization for dying clients
Date: Mon, 24 Jun 2013 11:52:59 +0400 [thread overview]
Message-ID: <20130624075259.17104.4743.stgit@localhost.localdomain> (raw)
In-Reply-To: <20130624075131.17104.55399.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;
}
prev parent reply other threads:[~2013-06-24 7:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 7:52 [PATCH v3 0/4] SUNRPC: PipeFS races fixes Stanislav Kinsbursky
2013-06-24 7:52 ` [PATCH v3 1/4] SUNRPC: fix races on PipeFS MOUNT notifications Stanislav Kinsbursky
2013-06-24 7:52 ` [PATCH v3 2/4] SUNRPC: fix races on PipeFS UMOUNT notifications Stanislav Kinsbursky
2013-06-25 16:13 ` Myklebust, Trond
2013-06-26 5:32 ` Stanislav Kinsbursky
2013-06-26 6:15 ` [PATCH v4] " Stanislav Kinsbursky
2013-06-28 11:51 ` William Dauchy
2013-06-24 7:52 ` [PATCH v3 3/4] SUNRPC: split client creation routine into setup and registration Stanislav Kinsbursky
2013-06-24 7:52 ` 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=20130624075259.17104.4743.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 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).