All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zach Brown <zach.brown@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [patch 3/3] ocfs2-timeout-protocol.patch
Date: Fri Dec  1 10:45:30 2006	[thread overview]
Message-ID: <45707647.4010006@oracle.com> (raw)
In-Reply-To: <20061201082748.031459000@suse.de>


> +	if(unlikely(sc->sc_handshake_ok == 0)) {
> +		if(sc->sc_page_off < sizeof(struct o2net_handshake)) {
> +			data = page_address(sc->sc_page) + sc->sc_page_off;
> +			datalen = sizeof(struct o2net_handshake) - sc->sc_page_off;
> +			ret = o2net_recv_tcp_msg(sc->sc_sock, data, datalen);
> +			if (ret > 0)
> +				sc->sc_page_off += ret;
> +		}
> +
> +		if (sc->sc_page_off == sizeof(struct o2net_handshake)) {
> +			o2net_check_handshake(sc);
> +		}
> +
> +		if(unlikely(sc->sc_handshake_ok == 0)) {
> +			goto out;
> +		}
> +	}

Has this been tested with a case where check_handshake() fails?  I
wonder if it will result in multiple messages because it doesn't return
an error when check_handshake fails.

The first time through it will queue disconnect work and print out the
message.  but it'll return +ve bytes read.  We'll come back into the
loop again, check the handshake again, but this time return 0 because no
bytes were read.  At that point   _rx_until_empty will stop retrying.

Am I missing something?

Otherwise it looks fine.

- z

  reply	other threads:[~2006-12-01 10:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01  0:27 [Ocfs2-devel] [patch 0/3] OCFS Configurable timeouts - Revision 4 abeekhof
2006-12-01  0:27 ` [Ocfs2-devel] [patch 1/3] ocfs2-expose-o2nm_cluster.patch abeekhof
2006-12-01  0:27 ` [Ocfs2-devel] [patch 2/3] ocfs2-configurable-timeout.patch abeekhof
2006-12-01  0:27 ` [Ocfs2-devel] [patch 3/3] ocfs2-timeout-protocol.patch abeekhof
2006-12-01 10:45   ` Zach Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-12-04  5:12 [Ocfs2-devel] [patch 0/3] OCFS Configurable timeouts - Revision 5 abeekhof
2006-12-04  5:12 ` [Ocfs2-devel] [patch 3/3] ocfs2-timeout-protocol.patch abeekhof
2006-12-04 15:59   ` Zach Brown
2006-12-05 20:45     ` Mark Fasheh
2006-11-30 10:22 [Ocfs2-devel] [patch 0/3] OCFS Configurable timeouts - Revision 3 abeekhof
2006-11-30 10:22 ` [Ocfs2-devel] [patch 3/3] ocfs2-timeout-protocol.patch abeekhof
2006-11-30 21:52   ` Mark Fasheh

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=45707647.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.