Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] DRBD-8 - after_state_ch() can attempt to terminate worker thread with wait==true
Date: Thu, 10 Aug 2006 11:55:40 +0200	[thread overview]
Message-ID: <200608101155.41001.philipp.reisner@linbit.com> (raw)
In-Reply-To: <342BAC0A5467384983B586A6B0B37671034711DB@EXNA.corp.stratus.com>

Am Montag, 7. August 2006 15:33 schrieb Graham, Simon:
> Near the end of after_state_ch() there are several clauses that stop
> (and restart) receiver and worker threads synchronously - since this
> function is called from both the worker and receiver thread context,
> these calls cannot be made synchronously (and an ASSERT in
> _drbd_thread_stop will fire).
>
> There seem to be a couple of issues here:
>
> 1. Is it the intention that after_state_ch is always called from the
> worker thread? If so, then the calls in drbd_receiver and
>    drbd_fs need to change to submit work items
>
> 2. No matter what, it should not issue synchronous calls to
> drbd_thread_stop for non-current threads.
>

I have to admit that I do not know myself how to do this right by now.

I wanted to get all those drbd_thread_stop*() calls spread all over the
code (usually happening if a state change was successfull) into a
central place.

The right solution probably is to use the asynchronous versions
in the after_state_ch() function, and to create aditional functions
with the semantics of wait_thread() , that can be used in that
some places after the successfull state change....

Will do this somewhen next week.

-Phil
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :

      parent reply	other threads:[~2006-08-10  9:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-07 13:33 [Drbd-dev] DRBD-8 - after_state_ch() can attempt to terminate worker thread with wait==true Graham, Simon
2006-08-10  9:49 ` Philipp Reisner
2006-08-10  9:55 ` Philipp Reisner [this message]

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=200608101155.41001.philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=drbd-dev@lists.linbit.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