From: Barry Naujok Date: Tue, 23 Jan 2007 14:50:28 +0000 (+0000) Subject: Fix xfs_repair dying with setting stackspace for threads X-Git-Tag: v2.9.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db5cf2c95ec083873ecf37f888e137ac56754406;p=thirdparty%2Fxfsprogs-dev.git Fix xfs_repair dying with setting stackspace for threads Merge of master-melb:xfs-cmds:27983a by kenmcd. Fix xfs_repair dying setting stackspace for threads --- diff --git a/repair/threads.c b/repair/threads.c index 6b51cfefd..ad4c2bd73 100644 --- a/repair/threads.c +++ b/repair/threads.c @@ -94,7 +94,7 @@ start_workers(work_queue_t *wq, unsigned thcnt, pthread_attr_t *attrp) init_workers(wq, thcnt); if ((work_threads = (pthread_t *)malloc(sizeof(pthread_t) * thcnt)) == NULL) - do_error(_("cannot malloc %ld bytes for work_threads array\n"), + do_error(_("cannot malloc %ld bytes for work_threads array\n"), sizeof(pthread_t) * thcnt); /* @@ -119,7 +119,6 @@ void thread_init(void) { int status; - size_t stacksize; pthread_attr_t attr; sigset_t blocked; @@ -131,14 +130,6 @@ thread_init(void) if ((status = pthread_attr_init(&attr)) != 0) do_error(_("status from pthread_attr_init: %d"),status); - if ((status = pthread_attr_getstacksize(&attr, &stacksize)) != 0) - do_error(_("status from pthread_attr_getstacksize: %d"), status); - - stacksize *= 4; - - if ((status = pthread_attr_setstacksize(&attr, stacksize)) != 0) - do_error(_("status from pthread_attr_setstacksize: %d"), status); - if ((status = pthread_setconcurrency(thread_count)) != 0) do_error(_("Status from pthread_setconcurrency(%d): %d"), thread_count, status);