Mailing List Archive

Wrong handling of drbd_send_data return value.
While looking at drbd 0.5.7 code, I've found this on the do_request
function:

if( drbd_conf[minor].conf.wire_protocol==DRBD_PROT_A || (!send_ok) ) {
/* If sending failed, we can not expect
an ack packet.
drbd_end_req(req, RQ_DRBD_SENT, 1);
}

drbd_end_req will acknowledge the upper layers that this request is
updated, while it has not reached the other node.

This breaks protocol B and C.
Re: Wrong handling of drbd_send_data return value. [ In reply to ]
Hi,

Can this bug why I have kernel panic with 57 ?
It is worth switching to protocol A ?

Thomas
--
Thomas Mangin (mailto:thomas.mangin@example.com)
System Administrator (mailto:systems@example.com)
Legend Internet Ltd. (http://www.legend.co.uk:/)
--
The urgent is done, the impossible is on the way, for miracles expect a
small delay


----- Original Message -----
From: Marcelo Tosatti <marcelo@example.com>
To: <drbd-devel@example.com>
Sent: Friday, October 06, 2000 1:15 AM
Subject: [DRBD-dev] Wrong handling of drbd_send_data return value.


>
> While looking at drbd 0.5.7 code, I've found this on the do_request
> function:
>
> if( drbd_conf[minor].conf.wire_protocol==DRBD_PROT_A || (!send_ok) )
{
> /* If sending failed, we can not expect
> an ack packet.
> drbd_end_req(req, RQ_DRBD_SENT, 1);
> }
>
> drbd_end_req will acknowledge the upper layers that this request is
> updated, while it has not reached the other node.
>
> This breaks protocol B and C.
>
>
>
> _______________________________________________
> DRBD-devel mailing list
> DRBD-devel@example.com
> http://lists.sourceforge.net/mailman/listinfo/drbd-devel
>
Re: Wrong handling of drbd_send_data return value. [ In reply to ]
On Fri, 6 Oct 2000, Thomas Mangin wrote:

> Hi,
>
> Can this bug why I have kernel panic with 57 ?

No.

> It is worth switching to protocol A ?

Protocol A may be unsafe for your application.
Re: Wrong handling of drbd_send_data return value. [ In reply to ]
* Marcelo Tosatti <marcelo@example.com> [001006 02:15]:
>
> While looking at drbd 0.5.7 code, I've found this on the do_request
> function:
>
> if( drbd_conf[minor].conf.wire_protocol==DRBD_PROT_A || (!send_ok) ) {
> /* If sending failed, we can not expect
> an ack packet.
> drbd_end_req(req, RQ_DRBD_SENT, 1);
> }
>
> drbd_end_req will acknowledge the upper layers that this request is
> updated, while it has not reached the other node.
>
> This breaks protocol B and C.
>

If it was not possible to send the packet DRBD will continue
to run in degraded mode.

-Philipp