Re: [PATCH] post 3.1 xlator/io-threads instability on NetBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 6, 2011 at 9:29 PM, Emmanuel Dreyfus <manu@xxxxxxxxxx> wrote:
> Emmanuel Dreyfus <manu@xxxxxxxxxx> wrote:
>
>> It seems there have been some refactoring of xlatorx/io-threads since 3.1.
>> It does not use sem_timedwait() anymore, that was replaced by
>> pthread_cond_timedwait().
>
> Here is the fix. You were quite lucky that Linux managed to get it
> working.
>
> --- xlators/performance/io-threads/src/io-threads.c.orig
> +++ xlators/performance/io-threads/src/io-threads.c
> @@ -2181,8 +2181,20 @@
>                         "out of memory");
>                 goto out;
>         }
>
> +       if ((ret = pthread_cond_init(&conf->cond, NULL)) != 0) {
> +                gf_log (this->name, GF_LOG_ERROR,
> +                        "pthread_cond_init failed (%d)", ret);
> +                goto out;
> +       }
> +
> +       if ((ret = pthread_mutex_init(&conf->mutex, NULL)) != 0) {
> +                gf_log (this->name, GF_LOG_ERROR,
> +                        "pthread_mutex_init failed (%d)", ret);
> +                goto out;
> +       }
> +
>         set_stack_size (conf);
>
>         thread_count = IOT_DEFAULT_THREADS;
>
>
>
> --
> Emmanuel Dreyfus
> http://hcpnet.free.fr/pubz
> manu@xxxxxxxxxx
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel@xxxxxxxxxx
> https://lists.nongnu.org/mailman/listinfo/gluster-devel
>

NetBSD porting is exposing real bugs. I am wondering if Linux wants to
excuse programmers mistakes on purpose. It is a bad idea to do so.
-- 
Anand Babu Periasamy
Blog [http://www.unlocksmith.org]

Imagination is more important than knowledge --Albert Einstein



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux