[Drbd-dev] [PATCH] drbd: reply cancel to source when target of verify becomes inconsistent

Philipp Reisner philipp.reisner at linbit.com
Tue Nov 10 14:18:37 CET 2020


Hi Zhang,

Thanks for the patch. I verified it. Everything is as you describe. I
applied it to the drbd-9.0 branch.

best regards,
 Phil

On Tue, Nov 10, 2020 at 3:31 AM Zhang Duan <duan.zhang at easystack.cn> wrote:

> Consider one situation below:
> 1. primary A disconnects with secondary B & C both of which are Uptodate
> 2. start a verify from B to C
> 3. during the verify above, A reconnects and starts a resync to C because
> of
> primary-lost-quorum
> 4. C becomes resync target and Inconsistent, then ignore the verify
> requests
> from B which are already in its receive buffer
> 5. verify from B to C stalls here
>
> To resolve it, at step 4, C should reply a message of P_RS_CANCEL to B
> Here is the result if do that:
> Nov 6 16:25:46 node-2 kernel: drbd drbd1/0 drbd1 node-3: Skipped verify,
> too busy: start=170208, size=48 (sectors)
> Nov 6 16:25:46 node-2 kernel: drbd drbd1/0 drbd1 node-3: Online verify
> done but 6 4k blocks skipped (total 314 sec; paused 0 sec; 3336 K/sec)
> Nov 6 16:25:46 node-2 kernel: drbd drbd1/0 drbd1 node-3: repl( VerifyS ->
> Established )
>
> Signed-off-by: ZhangDuan
> ---
> drbd/drbd_receiver.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
> index 268dbf4d..c6d4b7c9 100644
> --- a/drbd/drbd_receiver.c
> +++ b/drbd/drbd_receiver.c
> @@ -3273,6 +3273,8 @@ static int receive_DataRequest(struct
> drbd_connection *connection, struct packet
> break;
> case P_OV_REQUEST:
> verify_skipped_block(peer_device, sector, size);
> + drbd_send_ack_rp(peer_device, P_RS_CANCEL, p);
> + break;
> /* Fall through */
> case P_RS_THIN_REQ:
> case P_RS_DATA_REQUEST:
> --
> 2.24.0.windows.2
>
> --
> Sincerely Yours,
> Zhang Duan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-dev/attachments/20201110/1e539d2d/attachment.htm>


More information about the drbd-dev mailing list