From: Zach Brown <zach.brown@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 3/3] OCFS2 Configurable timeouts - Protocol changes
Date: Mon Nov 20 10:39:32 2006 [thread overview]
Message-ID: <456185DC.4010006@oracle.com> (raw)
In-Reply-To: <20061120173800.GF30647@ca-server1.us.oracle.com>
>> Sorry, I meant the logic that controlls when o2net_check_handshake()
>> is called by o2net_advance_rx().
>>
>> Specifically, this comment:
>> /* this working relies on the handshake being
>> * smaller than the normal message header */
> Ahh, ok. Do you have a specific fix in mind? I've CC'd Zach - he
> might have an idea. Otherwise, I'm not really too worried about growing the
> o2net_msg structure by a little bit - we ought to rename the fields to
> something like 'reserved0' and 'reserved1' though.
The current o2net_advance_rx() is being lazy and is putting the check
for handshake negotiation inside the block which receives the message
header. The current code will mistake a partially received handshake
header for a msg header once it exceeds the size of the message header.
The fix is easy, just hoist the handshake checking up into it's own
block before the header is received. It'd look like the header
receiving loop, but would call _check_handshake(). It needs to be
careful not to keep trying to parse headers if it doesn't get the whole
handshake. So something like:
if (unlikely(!handshake_ok)) {
setup data and datalen, recv into them;
if +ve, inc page_off
if (page_off == sizeof(handshake))
ret = _check_handshake()
if (!handshake_ok)
goto out;
}
You'd want to think harder about the return codes than I have here.
- z
next prev parent reply other threads:[~2006-11-20 10:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-17 23:36 [Ocfs2-devel] [patch 0/3] OCFS Configurable timeouts from userspace abeekhof
2006-11-17 23:36 ` [Ocfs2-devel] [patch 1/3] OCFS2 - Expose struct o2nm_cluster abeekhof
2006-11-17 23:36 ` [Ocfs2-devel] [patch 3/3] OCFS2 Configurable timeouts - Protocol changes abeekhof
2006-11-19 19:57 ` Mark Fasheh
2006-11-19 23:22 ` Andrew Beekhof
2006-11-20 9:38 ` Mark Fasheh
2006-11-20 10:13 ` Andrew Beekhof
2006-11-20 10:39 ` Zach Brown [this message]
2006-11-17 23:36 ` [Ocfs2-devel] [patch 2/3] OCFS2 Configurable timeouts abeekhof
2006-11-19 19:47 ` Mark Fasheh
2006-11-19 23:30 ` Andrew Beekhof
2006-11-20 9:39 ` Mark Fasheh
2006-11-18 2:35 ` [Ocfs2-devel] Re: [patch 0/3] OCFS Configurable timeouts from userspace Andrew Beekhof
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=456185DC.4010006@oracle.com \
--to=zach.brown@oracle.com \
--cc=ocfs2-devel@oss.oracle.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 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.