diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2012-08-01 10:43:01 (GMT) |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-09 13:05:49 (GMT) |
commit | 427c0434fc52f15bd762ddc6611e874df6cc5b8d (patch) | |
tree | 5d83c132fd0809884f5199a48ec6bbb9c7690ece /drivers | |
parent | d4dabbe22d38752674c582e5bb40716a72397355 (diff) | |
download | linux-fsl-qoriq-427c0434fc52f15bd762ddc6611e874df6cc5b8d.tar.xz |
drbd: disambiguation, s/DISCARD_CONCURRENT/RESOLVE_CONFLICTS/
We don't discard anything here, really.
We resolve conflicting, concurrent writes to overlapping data blocks.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 20 |
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 91b7324..813f50d 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h @@ -799,7 +799,7 @@ extern struct fifo_buffer *fifo_alloc(int fifo_size); /* flag bits per tconn */ enum { NET_CONGESTED, /* The data socket is congested */ - DISCARD_CONCURRENT, /* Set on one node, cleared on the peer! */ + RESOLVE_CONFLICTS, /* Set on one node, cleared on the peer! */ SEND_PING, /* whether asender should send a ping asap */ SIGNAL_ASENDER, /* whether asender wants to be interrupted */ GOT_PING_ACK, /* set when we receive a ping_ack packet, ping_wait gets woken */ diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 466d6b1..35bb572 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -2249,7 +2249,7 @@ void resync_after_online_grow(struct drbd_conf *mdev) if (mdev->state.role != mdev->state.peer) iass = (mdev->state.role == R_PRIMARY); else - iass = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags); + iass = test_bit(RESOLVE_CONFLICTS, &mdev->tconn->flags); if (iass) drbd_start_resync(mdev, C_SYNC_SOURCE); diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index afab66b..9912107 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c @@ -916,7 +916,7 @@ static int conn_connect(struct drbd_tconn *tconn) sock.socket = s; send_first_packet(tconn, &sock, P_INITIAL_DATA); } else if (!msock.socket) { - clear_bit(DISCARD_CONCURRENT, &tconn->flags); + clear_bit(RESOLVE_CONFLICTS, &tconn->flags); msock.socket = s; send_first_packet(tconn, &msock, P_INITIAL_META); } else { @@ -954,7 +954,7 @@ retry: sock.socket = s; break; case P_INITIAL_META: - set_bit(DISCARD_CONCURRENT, &tconn->flags); + set_bit(RESOLVE_CONFLICTS, &tconn->flags); if (msock.socket) { conn_warn(tconn, "initial packet M crossed\n"); sock_release(msock.socket); @@ -1899,7 +1899,7 @@ static bool need_peer_seq(struct drbd_conf *mdev) /* * We only need to keep track of the last packet_seq number of our peer - * if we are in dual-primary mode and we have the discard flag set; see + * if we are in dual-primary mode and we have the resolve-conflicts flag set; see * handle_write_conflicts(). */ @@ -1907,7 +1907,7 @@ static bool need_peer_seq(struct drbd_conf *mdev) tp = rcu_dereference(mdev->tconn->net_conf)->two_primaries; rcu_read_unlock(); - return tp && test_bit(DISCARD_CONCURRENT, &tconn->flags); + return tp && test_bit(RESOLVE_CONFLICTS, &tconn->flags); } static void update_peer_seq(struct drbd_conf *mdev, unsigned int peer_seq) @@ -2048,7 +2048,7 @@ static int handle_write_conflicts(struct drbd_conf *mdev, struct drbd_peer_request *peer_req) { struct drbd_tconn *tconn = mdev->tconn; - bool resolve_conflicts = test_bit(DISCARD_CONCURRENT, &tconn->flags); + bool resolve_conflicts = test_bit(RESOLVE_CONFLICTS, &tconn->flags); sector_t sector = peer_req->i.sector; const unsigned int size = peer_req->i.size; struct drbd_interval *i; @@ -2600,7 +2600,7 @@ static int drbd_asb_recover_0p(struct drbd_conf *mdev) __must_hold(local) "Using discard-least-changes instead\n"); case ASB_DISCARD_ZERO_CHG: if (ch_peer == 0 && ch_self == 0) { - rv = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags) + rv = test_bit(RESOLVE_CONFLICTS, &mdev->tconn->flags) ? -1 : 1; break; } else { @@ -2616,7 +2616,7 @@ static int drbd_asb_recover_0p(struct drbd_conf *mdev) __must_hold(local) rv = 1; else /* ( ch_self == ch_peer ) */ /* Well, then use something else. */ - rv = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags) + rv = test_bit(RESOLVE_CONFLICTS, &mdev->tconn->flags) ? -1 : 1; break; case ASB_DISCARD_LOCAL: @@ -2839,7 +2839,7 @@ static int drbd_uuid_compare(struct drbd_conf *mdev, int *rule_nr) __must_hold(l case 1: /* self_pri && !peer_pri */ return 1; case 2: /* !self_pri && peer_pri */ return -1; case 3: /* self_pri && peer_pri */ - dc = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags); + dc = test_bit(RESOLVE_CONFLICTS, &mdev->tconn->flags); return dc ? -1 : 1; } } @@ -3775,7 +3775,7 @@ static int receive_req_state(struct drbd_tconn *tconn, struct packet_info *pi) mask.i = be32_to_cpu(p->mask); val.i = be32_to_cpu(p->val); - if (test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags) && + if (test_bit(RESOLVE_CONFLICTS, &mdev->tconn->flags) && mutex_is_locked(mdev->state_mutex)) { drbd_send_sr_reply(mdev, SS_CONCURRENT_ST_CHG); return 0; @@ -3801,7 +3801,7 @@ static int receive_req_conn_state(struct drbd_tconn *tconn, struct packet_info * mask.i = be32_to_cpu(p->mask); val.i = be32_to_cpu(p->val); - if (test_bit(DISCARD_CONCURRENT, &tconn->flags) && + if (test_bit(RESOLVE_CONFLICTS, &tconn->flags) && mutex_is_locked(&tconn->cstate_mutex)) { conn_send_sr_reply(tconn, SS_CONCURRENT_ST_CHG); return 0; |