From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [3/3] POHMELFS high performance network filesystem.
Date: Sun, 15 Jun 2008 13:14:08 +0400 [thread overview]
Message-ID: <20080615091407.GA4468@2ka.mipt.ru> (raw)
In-Reply-To: <19f34abd0806150047w4338502en9a75681fb0c95438@mail.gmail.com>
Hi Vegard.
On Sun, Jun 15, 2008 at 09:47:03AM +0200, Vegard Nossum (vegard.nossum@gmail.com) wrote:
> I'm having a hard time convincing myself that the error handling here
> is correct. You have this kind of setup:
>
> 1. for each config in config list {
> 2. for each config in superblock state list {
> pohmelfs_config_eql();
> ...
> }
> }
>
> And according to your code, if pohmelfs_config_eql returns non-zero in
> the last iteration of #1, then -EEXISTS will be the return value of
> the whole function (but the config _will_ be copied; it is not undone
> in this case). But if pohmenlfs_config_eql returns non-zero in any but
> the last iteration of #1, then 0 will be the return value. Is this
> your intention?
Task of this function is to copy as much new configs added by user (or
by remote server) as we can.
If config already exists (was copied in previous iterations) we skip it.
If it does not, we allocate new structure and initialize it. If
allocation fails, it is a serious error and unlikely we want to proceed,
so we jump out of the loop and drop all states and return error. If we
just failed to initialie new state (like connection was refused by
remote server), we simply drop that failed case and proceed further. In
theory we still can leave that half-initialized states in the list, and
any attempt to send request via them will try to initialize its network
part, but thread creation and allocation itself will be tried to
recover, so I just drop such state here. I think initialization function
should not return error if it failed to connect or create a socket,
since it can/will be recovered later if needed.
We should not return eexist, from non-error label, but at the only
place, where this return value is checked (mount time initialization),
superblock list is empty and thus this error can not happen.
--
Evgeniy Polyakov
next prev parent reply other threads:[~2008-06-15 9:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 16:37 [0/3] POHMELFS high performance network filesystem. First steps in parallel processing Evgeniy Polyakov
2008-06-13 16:40 ` [1/3] POHMELFS: VFS trivial change Evgeniy Polyakov
2008-06-13 16:41 ` [2/3] POHMELFS: Documentation Evgeniy Polyakov
2008-06-14 2:15 ` Jamie Lokier
2008-06-14 6:56 ` Evgeniy Polyakov
2008-06-14 9:49 ` Jeff Garzik
2008-06-14 18:45 ` Trond Myklebust
2008-06-14 19:25 ` Evgeniy Polyakov
2008-06-15 4:27 ` Sage Weil
2008-06-15 5:57 ` Evgeniy Polyakov
2008-06-15 16:41 ` Sage Weil
2008-06-15 17:50 ` Evgeniy Polyakov
2008-06-16 3:17 ` Sage Weil
2008-06-16 10:20 ` Evgeniy Polyakov
2008-06-13 16:42 ` [3/3] POHMELFS high performance network filesystem Evgeniy Polyakov
2008-06-15 7:47 ` Vegard Nossum
2008-06-15 9:14 ` Evgeniy Polyakov [this message]
2008-06-14 9:52 ` [0/3] POHMELFS high performance network filesystem. First steps in parallel processing Jeff Garzik
2008-06-14 10:10 ` Evgeniy Polyakov
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=20080615091407.GA4468@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vegard.nossum@gmail.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;
as well as URLs for NNTP newsgroup(s).