From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
To: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: "bfields@fieldses.org" <bfields@fieldses.org>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel@openvz.org" <devel@openvz.org>
Subject: Re: [PATCH 2/3] SUNRPC: traverse clients tree on PipeFS event
Date: Thu, 26 Apr 2012 18:11:42 +0000 [thread overview]
Message-ID: <1335463902.9701.35.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20120420141925.10848.90395.stgit@localhost6.localdomain6>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 980 bytes --]
On Fri, 2012-04-20 at 18:19 +0400, Stanislav Kinsbursky wrote:
> +static int __rpc_pipefs_event(struct rpc_clnt *clnt, unsigned long event,
> + struct super_block *sb)
> +{
> + int error;
> +
> + if (!rpc_clnt_skip_event(clnt, event)) {
> + error = __rpc_clnt_handle_event(clnt, event, sb);
> + if (error)
> + return error;
> + }
> + if (clnt != clnt->cl_parent)
> + return __rpc_pipefs_event(clnt->cl_parent, event, sb);
> + return 0;
> +}
Hi Stanislav,
Recursion in the kernel is generally frowned upon due to the stack size
limits. Could you please rewrite the above into a simple loop. Something
along the lines of:
for(;;) {
...
if (clnt == clnt->cl_parent)
break;
clnt = clnt->cl_parent;
}
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2012-04-26 18:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 14:18 [PATCH 0/3] SUNRPC: three bugfixes for PipeFS event handling Stanislav Kinsbursky
2012-04-20 14:19 ` [PATCH 1/3] SUNRPC: skip clients with program without PipeFS entries Stanislav Kinsbursky
2012-04-20 14:19 ` [PATCH 2/3] SUNRPC: traverse clients tree on PipeFS event Stanislav Kinsbursky
2012-04-26 18:11 ` Myklebust, Trond [this message]
2012-04-26 18:26 ` Stanislav Kinsbursky
2012-04-27 9:00 ` [PATCH v2 " Stanislav Kinsbursky
2012-04-20 14:19 ` [PATCH 3/3] SUNRPC: set per-net PipeFS superblock before notification Stanislav Kinsbursky
2012-04-25 18:24 ` [PATCH 0/3] SUNRPC: three bugfixes for PipeFS event handling J. Bruce Fields
2012-04-25 20:59 ` Stanislav Kinsbursky
2012-04-25 21:02 ` J. Bruce Fields
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=1335463902.9701.35.camel@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=skinsbursky@parallels.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
all inboxes | Powered by JetHome®