From: Lon Hohberger <lhh@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] rgmanager: Fix short read handling while loading resource rules
Date: Wed, 30 Jan 2008 13:58:57 -0500 [thread overview]
Message-ID: <1201719537.15818.94.camel@ayanami.boston.devel.redhat.com> (raw)
If a short read occurs (maybe due to a race between the parent/child
processes in SMP systems?) while reading from the pipe while using
resource rules, we break the loop early even if there's more data to be
had at a later time.
It fixed the problem for the reporter.
-- Lon
Index: resrules.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/resrules.c,v
retrieving revision 1.16.2.9
diff -u -r1.16.2.9 resrules.c
--- resrules.c 18 Dec 2007 17:52:56 -0000 1.16.2.9
+++ resrules.c 30 Jan 2008 18:35:14 -0000
@@ -906,7 +906,7 @@
if (n == 0 && (!*length))
return 0;
- if (n != sizeof(buf)) {
+ if (n == 0) {
done = 1;
}
reply other threads:[~2008-01-30 18:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1201719537.15818.94.camel@ayanami.boston.devel.redhat.com \
--to=lhh@redhat.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).