aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-05-06 14:00:02 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:55:49 -0500
commit6139f60dc192e2c5478c1126d1aff7905dc0a98a (patch)
tree4a9dd1f51d99232c406ae0cc12b6673312e95799 /drivers/block/drbd/drbd_receiver.c
parent7bac3e6f7e74993475a94487effe05dc1f68bdc7 (diff)
drbd: Rename the want_lose field/flag to discard_my_data
This is what it is called in config files and on the command line as well. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index aa42967398e3..e4e8f8a408d1 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2908,9 +2908,9 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol
2908 } 2908 }
2909 2909
2910 if (hg == -100) { 2910 if (hg == -100) {
2911 if (nc->want_lose && !(mdev->p_uuid[UI_FLAGS]&1)) 2911 if (nc->discard_my_data && !(mdev->p_uuid[UI_FLAGS]&1))
2912 hg = -1; 2912 hg = -1;
2913 if (!nc->want_lose && (mdev->p_uuid[UI_FLAGS]&1)) 2913 if (!nc->discard_my_data && (mdev->p_uuid[UI_FLAGS]&1))
2914 hg = 1; 2914 hg = 1;
2915 2915
2916 if (abs(hg) < 100) 2916 if (abs(hg) < 100)
@@ -3009,7 +3009,7 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi)
3009{ 3009{
3010 struct p_protocol *p = pi->data; 3010 struct p_protocol *p = pi->data;
3011 int p_proto, p_after_sb_0p, p_after_sb_1p, p_after_sb_2p; 3011 int p_proto, p_after_sb_0p, p_after_sb_1p, p_after_sb_2p;
3012 int p_want_lose, p_two_primaries, cf; 3012 int p_discard_my_data, p_two_primaries, cf;
3013 struct net_conf *nc; 3013 struct net_conf *nc;
3014 3014
3015 p_proto = be32_to_cpu(p->protocol); 3015 p_proto = be32_to_cpu(p->protocol);
@@ -3018,7 +3018,7 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi)
3018 p_after_sb_2p = be32_to_cpu(p->after_sb_2p); 3018 p_after_sb_2p = be32_to_cpu(p->after_sb_2p);
3019 p_two_primaries = be32_to_cpu(p->two_primaries); 3019 p_two_primaries = be32_to_cpu(p->two_primaries);
3020 cf = be32_to_cpu(p->conn_flags); 3020 cf = be32_to_cpu(p->conn_flags);
3021 p_want_lose = cf & CF_WANT_LOSE; 3021 p_discard_my_data = cf & CF_DISCARD_MY_DATA;
3022 3022
3023 if (tconn->agreed_pro_version >= 87) { 3023 if (tconn->agreed_pro_version >= 87) {
3024 char integrity_alg[SHARED_SECRET_MAX]; 3024 char integrity_alg[SHARED_SECRET_MAX];
@@ -3075,8 +3075,8 @@ static int receive_protocol(struct drbd_tconn *tconn, struct packet_info *pi)
3075 goto disconnect_rcu_unlock; 3075 goto disconnect_rcu_unlock;
3076 } 3076 }
3077 3077
3078 if (p_want_lose && nc->want_lose) { 3078 if (p_discard_my_data && nc->discard_my_data) {
3079 conn_err(tconn, "both sides have the 'want_lose' flag set\n"); 3079 conn_err(tconn, "both sides have the 'discard_my_data' flag set\n");
3080 goto disconnect_rcu_unlock; 3080 goto disconnect_rcu_unlock;
3081 } 3081 }
3082 3082
@@ -3806,7 +3806,7 @@ static int receive_state(struct drbd_tconn *tconn, struct packet_info *pi)
3806 } 3806 }
3807 3807
3808 mutex_lock(&mdev->tconn->conf_update); 3808 mutex_lock(&mdev->tconn->conf_update);
3809 mdev->tconn->net_conf->want_lose = 0; /* without copy; single bit op is atomic */ 3809 mdev->tconn->net_conf->discard_my_data = 0; /* without copy; single bit op is atomic */
3810 mutex_unlock(&mdev->tconn->conf_update); 3810 mutex_unlock(&mdev->tconn->conf_update);
3811 3811
3812 drbd_md_sync(mdev); /* update connected indicator, la_size, ... */ 3812 drbd_md_sync(mdev); /* update connected indicator, la_size, ... */