From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools libmultipath/log_pthread.c lib ...
Date: 30 Mar 2009 19:58:41 -0000 [thread overview]
Message-ID: <20090330195841.25175.qmail@sourceware.org> (raw)
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2009-03-30 19:58:40
Modified files:
libmultipath : log_pthread.c waiter.c
multipathd : main.c
Log message:
Fixes for bzs 465117 and 474627. I've alreay posted the upstream patch for
465117 and 474627 is not an issue upstream.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/log_pthread.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.1.2.2&r2=1.1.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/libmultipath/waiter.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/main.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.69.2.15&r2=1.69.2.16
--- multipath-tools/libmultipath/log_pthread.c 2008/08/27 19:14:57 1.1.2.2
+++ multipath-tools/libmultipath/log_pthread.c 2009/03/30 19:58:38 1.1.2.3
@@ -6,6 +6,7 @@
#include <stdarg.h>
#include <pthread.h>
#include <sys/mman.h>
+#include <limits.h>
#include <memory.h>
@@ -61,6 +62,7 @@
void log_thread_start (void)
{
+ size_t stacksize = 64 * 1024;
pthread_attr_t attr;
logdbg(stderr,"enter log_thread_start\n");
@@ -74,7 +76,9 @@
pthread_cond_init(logev_cond, NULL);
pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, 64 * 1024);
+ if (stacksize < PTHREAD_STACK_MIN)
+ stacksize = PTHREAD_STACK_MIN;
+ pthread_attr_setstacksize(&attr, stacksize);
if (log_init("multipathd", 0)) {
fprintf(stderr,"can't initialize log buffer\n");
--- multipath-tools/libmultipath/waiter.c 2008/09/08 22:01:20 1.1.2.3
+++ multipath-tools/libmultipath/waiter.c 2009/03/30 19:58:39 1.1.2.4
@@ -199,6 +199,7 @@
int start_waiter_thread (struct multipath *mpp, struct vectors *vecs)
{
+ size_t stacksize = 32 * 1024;
pthread_attr_t attr;
struct event_thread *wp;
@@ -208,7 +209,9 @@
if (pthread_attr_init(&attr))
goto out;
- pthread_attr_setstacksize(&attr, 32 * 1024);
+ if (stacksize < PTHREAD_STACK_MIN)
+ stacksize = PTHREAD_STACK_MIN;
+ pthread_attr_setstacksize(&attr, stacksize);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
wp = alloc_waiter();
--- multipath-tools/multipathd/main.c 2009/03/26 03:28:09 1.69.2.15
+++ multipath-tools/multipathd/main.c 2009/03/30 19:58:40 1.69.2.16
@@ -362,6 +362,7 @@
struct path * pp;
char empty_buff[WWID_SIZE] = {0};
int ret;
+ int retrys = 10;
ret = device_ok_to_add(devname);
if (ret < 0)
@@ -439,9 +440,10 @@
/*
* deal with asynchronous uevents :((
*/
- if (mpp->action == ACT_RELOAD) {
+ if (mpp->action == ACT_RELOAD & retrys > 0) {
condlog(0, "%s: uev_add_path sleep", mpp->alias);
sleep(1);
+ retrys--;
update_mpp_paths(mpp, vecs->pathvec);
goto rescan;
}
@@ -1243,7 +1245,6 @@
static int
unmount_extra_devs(void)
{
- int ret;
char buf[LINE_MAX];
FILE *file;
@@ -1276,7 +1277,7 @@
}
}
fclose(file);
- return ret;
+ return 0;
}
@@ -1514,6 +1515,7 @@
static int
child (void * param)
{
+ size_t stacksize = 64 * 1024;
pthread_t check_thr, uevent_thr, uxlsnr_thr;
pthread_attr_t attr;
struct vectors * vecs;
@@ -1594,7 +1596,9 @@
* start threads
*/
pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, 64 * 1024);
+ if (stacksize < PTHREAD_STACK_MIN)
+ stacksize = PTHREAD_STACK_MIN;
+ pthread_attr_setstacksize(&attr, stacksize);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
pthread_create(&check_thr, &attr, checkerloop, vecs);
reply other threads:[~2009-03-30 19: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=20090330195841.25175.qmail@sourceware.org \
--to=bmarzins@sourceware.org \
--cc=dm-cvs@sourceware.org \
--cc=dm-devel@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 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.