Skip to content

Commit

Permalink
Merged in DW-1362-connecting (pull request #392)
Browse files Browse the repository at this point in the history
DW-1362 connecting
  • Loading branch information
sungeun-kim committed Jan 20, 2017
2 parents 9eb4655 + 821d295 commit d51dfae
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ static bool state_has_changed(struct drbd_resource *resource)
struct drbd_device *device;
int vnr;


#ifdef _WIN32 DW-1362 To avoid, twopc_commit processing with nostatechange should clear remote_state_change_flag
idr_for_each_entry(struct drbd_device *, &resource->devices, device, vnr) {
struct drbd_peer_device *peer_device;
for_each_peer_device(peer_device, device) {
peer_device->uuid_flags &= ~UUID_FLAG_GOT_STABLE;
}
}
#endif

if (test_and_clear_bit(NEGOTIATION_RESULT_TOUCHED, &resource->flags))
return true;

Expand All @@ -295,7 +305,7 @@ static bool state_has_changed(struct drbd_resource *resource)
return true;
}

#ifdef _WIN32
#ifdef _WIN32
idr_for_each_entry(struct drbd_device *, &resource->devices, device, vnr) {
#else
idr_for_each_entry(&resource->devices, device, vnr) {
Expand All @@ -315,8 +325,13 @@ static bool state_has_changed(struct drbd_resource *resource)
peer_device->resync_susp_dependency[OLD] !=
peer_device->resync_susp_dependency[NEW] ||
peer_device->resync_susp_other_c[OLD] !=
#ifdef _WIN32 DW-1362 To avoid, twopc_commit processing with nostatechange should clear remote_state_change_flag
peer_device->resync_susp_other_c[NEW])
#else
peer_device->resync_susp_other_c[NEW] ||
peer_device->uuid_flags & UUID_FLAG_GOT_STABLE)
peer_device->uuid_flags & UUID_FLAG_GOT_STABLE)
#endif

return true;
}
}
Expand Down Expand Up @@ -4362,7 +4377,7 @@ static void twopc_end_nested(struct drbd_resource *resource, enum drbd_packet cm
resource->twopc_work.cb = NULL;
spin_unlock_irq(&resource->req_lock);

if (!twopc_reply.tid || !expect(resource, !list_empty(&parents))){
if (!twopc_reply.tid){
#ifdef _WIN32_TWOPC
drbd_info(resource, "!twopc_reply.tid = %u result: %s\n",
twopc_reply.tid, drbd_packet_name(cmd));
Expand Down

0 comments on commit d51dfae

Please sign in to comment.