[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 0/2] nbd/server: Quiesce server on drained section
From: |
Kevin Wolf |
Subject: |
Re: [PATCH v2 0/2] nbd/server: Quiesce server on drained section |
Date: |
Wed, 2 Jun 2021 13:57:05 +0200 |
Am 02.06.2021 um 08:05 hat Sergio Lopez geschrieben:
> Before switching between AioContexts we need to make sure that we're
> fully quiesced ("nb_requests == 0" for every client) when entering the
> drained section. Otherwise, coroutines may be run in the wrong context
> after the switch, leading to a number of critical issues.
>
> To accomplish this, we add ".drained_poll" to BlockDevOps and use it
> in the NBD server, along with ".drained_being" and "drained_end", to
> coordinate the quiescing of the server while entering a drained
> section.
>
> v2:
> - Use a bool for the value returned by .drained_poll [Kevin]
> - Change .drained_poll comment to reflect that the returned boolean
> value will be true if the device is still busy, or false otherwise
> - Drop yield_co_list and use recv_coroutine and read_yielding [Kevin]
> - Return "true" or "false" in nbd_drained_poll [Kevin]
> - Fix grammar in the commit message of patch 2 [Eric]
Thanks, applied to the block branch.
Kevin