* [Drbd-dev] DRBD-8: Fix to Negotiating state handling
@ 2006-09-15 20:29 Graham, Simon
0 siblings, 0 replies; 4+ messages in thread
From: Graham, Simon @ 2006-09-15 20:29 UTC (permalink / raw)
To: drbd-dev
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
I took the latest update today and found that when I did detach/attach,
the side attaching would never exit the Negotiating state - the other
side updated it's view of the peer correctly, but it never sent anything
back to the originating side to make it go from Negotiating to UpToDate
- I _think_ the expected thing here is to send back a ReportState
message when we are Connected _and_ the peer says its Negotiating --
patch attached that seems to work...
Simon
[-- Attachment #2: connpatch.patch --]
[-- Type: application/octet-stream, Size: 424 bytes --]
Index: drbd/drbd_receiver.c
===================================================================
--- drbd/drbd_receiver.c (revision 4063)
+++ drbd/drbd_receiver.c (working copy)
@@ -2167,6 +2171,10 @@
drbd_send_state(mdev);
}
}
+ else if (nconn == Connected && ns.disk == Negotiating) {
+ // peer is waiting for us to respond...
+ drbd_send_state(mdev);
+ }
spin_lock_irq(&mdev->req_lock);
os = mdev->state;
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [Drbd-dev] DRBD-8: Fix to Negotiating state handling
@ 2006-09-17 15:03 Graham, Simon
0 siblings, 0 replies; 4+ messages in thread
From: Graham, Simon @ 2006-09-17 15:03 UTC (permalink / raw)
To: Graham, Simon, drbd-dev
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]
Hmm - not sure what I was on the other day, but this patch was wrong --
I was comparing the local disk state to negotiating instead of the peers
state! Still doesn't seem to be working right though... any better
suggestions?
Simon
> -----Original Message-----
> From: drbd-dev-bounces@linbit.com [mailto:drbd-dev-bounces@linbit.com]
> On Behalf Of Graham, Simon
> Sent: Friday, September 15, 2006 4:30 PM
> To: drbd-dev@linbit.com
> Subject: [Drbd-dev] DRBD-8: Fix to Negotiating state handling
>
> I took the latest update today and found that when I did
detach/attach,
> the side attaching would never exit the Negotiating state - the other
> side updated it's view of the peer correctly, but it never sent
> anything
> back to the originating side to make it go from Negotiating to
UpToDate
> - I _think_ the expected thing here is to send back a ReportState
> message when we are Connected _and_ the peer says its Negotiating --
> patch attached that seems to work...
>
> Simon
>
[-- Attachment #2: connpatch.patch --]
[-- Type: application/octet-stream, Size: 432 bytes --]
Index: drbd/drbd_receiver.c
===================================================================
--- drbd/drbd_receiver.c (revision 4063)
+++ drbd/drbd_receiver.c (working copy)
@@ -2167,6 +2171,10 @@
drbd_send_state(mdev);
}
}
+ else if (nconn == Connected && peer_state.disk == Negotiating) {
+ // peer is waiting for us to respond...
+ drbd_send_state(mdev);
+ }
spin_lock_irq(&mdev->req_lock);
os = mdev->state;
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [Drbd-dev] DRBD-8: Fix to Negotiating state handling
@ 2006-09-17 16:10 Graham, Simon
2006-09-18 12:10 ` Philipp Reisner
0 siblings, 1 reply; 4+ messages in thread
From: Graham, Simon @ 2006-09-17 16:10 UTC (permalink / raw)
To: Graham, Simon, drbd-dev
[-- Attachment #1: Type: text/plain, Size: 1604 bytes --]
Ignore previous email... I've figured out what I did wrong (test was in
the wrong place) -- I also left out the code to have the receiver of a
negotiating state update it's peer state to UpToDate instead of
Negotiating...
Final, really working but possibly not entirely correct, patch
attached...
Simon
> -----Original Message-----
> From: Graham, Simon
> Sent: Sunday, September 17, 2006 11:04 AM
> To: Graham, Simon; drbd-dev@linbit.com
> Subject: RE: [Drbd-dev] DRBD-8: Fix to Negotiating state handling
>
> Hmm - not sure what I was on the other day, but this patch was wrong
--
> I was comparing the local disk state to negotiating instead of the
> peers state! Still doesn't seem to be working right though... any
> better suggestions?
>
> Simon
>
> > -----Original Message-----
> > From: drbd-dev-bounces@linbit.com [mailto:drbd-dev-
> bounces@linbit.com]
> > On Behalf Of Graham, Simon
> > Sent: Friday, September 15, 2006 4:30 PM
> > To: drbd-dev@linbit.com
> > Subject: [Drbd-dev] DRBD-8: Fix to Negotiating state handling
> >
> > I took the latest update today and found that when I did
> detach/attach,
> > the side attaching would never exit the Negotiating state - the
other
> > side updated it's view of the peer correctly, but it never sent
> > anything
> > back to the originating side to make it go from Negotiating to
> UpToDate
> > - I _think_ the expected thing here is to send back a ReportState
> > message when we are Connected _and_ the peer says its Negotiating --
> > patch attached that seems to work...
> >
> > Simon
> >
[-- Attachment #2: connpatch.patch --]
[-- Type: application/octet-stream, Size: 891 bytes --]
Index: drbd_receiver.c
===================================================================
--- drbd_receiver.c (.../trunk/drbd/drbd_receiver.c) (revision 4094)
+++ drbd_receiver.c (.../branches/drbd-panic/drbd/drbd_receiver.c) (revision 4094)
@@ -2166,6 +2170,10 @@
drbd_send_uuids(mdev);
drbd_send_state(mdev);
}
+ else if (nconn == Connected && peer_state.disk == Negotiating) {
+ // peer is waiting for us to respond...
+ drbd_send_state(mdev);
+ }
}
spin_lock_irq(&mdev->req_lock);
@@ -2176,6 +2184,7 @@
ns.pdsk = peer_state.disk;
ns.peer_isp = ( peer_state.aftr_isp | peer_state.user_isp );
if(nconn == Connected && ns.disk == Negotiating ) ns.disk = UpToDate;
+ if(nconn == Connected && ns.pdsk == Negotiating ) ns.pdsk = UpToDate;
rv = _drbd_set_state(mdev,ns,ChgStateVerbose | ChgStateHard);
spin_unlock_irq(&mdev->req_lock);
if (rv==SS_Success) {
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Drbd-dev] DRBD-8: Fix to Negotiating state handling
2006-09-17 16:10 [Drbd-dev] DRBD-8: Fix to Negotiating state handling Graham, Simon
@ 2006-09-18 12:10 ` Philipp Reisner
0 siblings, 0 replies; 4+ messages in thread
From: Philipp Reisner @ 2006-09-18 12:10 UTC (permalink / raw)
To: drbd-dev
Am Sonntag, 17. September 2006 18:10 schrieb Graham, Simon:
> Ignore previous email... I've figured out what I did wrong (test was in
> the wrong place) -- I also left out the code to have the receiver of a
> negotiating state update it's peer state to UpToDate instead of
> Negotiating...
>
> Final, really working but possibly not entirely correct, patch
> attached...
> Simon
Hi Simon,
Thanks!
I think the patch is right. It seems I have tested all cases where
a resync start after attach, but I missed to test the case where
no resync happens after the attach command.
-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 :
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-09-18 12:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-17 16:10 [Drbd-dev] DRBD-8: Fix to Negotiating state handling Graham, Simon
2006-09-18 12:10 ` Philipp Reisner
-- strict thread matches above, loose matches on Subject: below --
2006-09-17 15:03 Graham, Simon
2006-09-15 20:29 Graham, Simon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox