Commit 6dff2902 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

drbd: Rename --dry-run to --tentative

drbdadm already has a --dry-run option, so this option cannot directly be
passed through to drbdsetup.  Rename the drbdsetup option to resolve this
conflict.

For backward compatibility, make --dry-run an alias of --tentative.
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent d0fa7fd6
...@@ -926,7 +926,7 @@ int __drbd_send_protocol(struct drbd_tconn *tconn, enum drbd_packet cmd) ...@@ -926,7 +926,7 @@ int __drbd_send_protocol(struct drbd_tconn *tconn, enum drbd_packet cmd)
rcu_read_lock(); rcu_read_lock();
nc = rcu_dereference(tconn->net_conf); nc = rcu_dereference(tconn->net_conf);
if (nc->dry_run && tconn->agreed_pro_version < 92) { if (nc->tentative && tconn->agreed_pro_version < 92) {
rcu_read_unlock(); rcu_read_unlock();
mutex_unlock(&sock->mutex); mutex_unlock(&sock->mutex);
conn_err(tconn, "--dry-run is not supported by peer"); conn_err(tconn, "--dry-run is not supported by peer");
...@@ -945,7 +945,7 @@ int __drbd_send_protocol(struct drbd_tconn *tconn, enum drbd_packet cmd) ...@@ -945,7 +945,7 @@ int __drbd_send_protocol(struct drbd_tconn *tconn, enum drbd_packet cmd)
cf = 0; cf = 0;
if (nc->discard_my_data) if (nc->discard_my_data)
cf |= CF_DISCARD_MY_DATA; cf |= CF_DISCARD_MY_DATA;
if (nc->dry_run) if (nc->tentative)
cf |= CF_DRY_RUN; cf |= CF_DRY_RUN;
p->conn_flags = cpu_to_be32(cf); p->conn_flags = cpu_to_be32(cf);
......
...@@ -2836,7 +2836,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol ...@@ -2836,7 +2836,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol
enum drbd_conns rv = C_MASK; enum drbd_conns rv = C_MASK;
enum drbd_disk_state mydisk; enum drbd_disk_state mydisk;
struct net_conf *nc; struct net_conf *nc;
int hg, rule_nr, rr_conflict, dry_run; int hg, rule_nr, rr_conflict, tentative;
mydisk = mdev->state.disk; mydisk = mdev->state.disk;
if (mydisk == D_NEGOTIATING) if (mydisk == D_NEGOTIATING)
...@@ -2916,7 +2916,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol ...@@ -2916,7 +2916,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol
(hg < 0) ? "peer" : "this"); (hg < 0) ? "peer" : "this");
} }
rr_conflict = nc->rr_conflict; rr_conflict = nc->rr_conflict;
dry_run = nc->dry_run; tentative = nc->tentative;
rcu_read_unlock(); rcu_read_unlock();
if (hg == -100) { if (hg == -100) {
...@@ -2949,7 +2949,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol ...@@ -2949,7 +2949,7 @@ static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev, enum drbd_rol
} }
} }
if (dry_run || test_bit(CONN_DRY_RUN, &mdev->tconn->flags)) { if (tentative || test_bit(CONN_DRY_RUN, &mdev->tconn->flags)) {
if (hg == 0) if (hg == 0)
dev_info(DEV, "dry-run connect: No resync, would become Connected immediately.\n"); dev_info(DEV, "dry-run connect: No resync, would become Connected immediately.\n");
else else
......
...@@ -164,7 +164,7 @@ GENL_struct(DRBD_NLA_NET_CONF, 5, net_conf, ...@@ -164,7 +164,7 @@ GENL_struct(DRBD_NLA_NET_CONF, 5, net_conf,
__flg_field(25, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, discard_my_data) __flg_field(25, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, discard_my_data)
__flg_field_def(26, DRBD_GENLA_F_MANDATORY, tcp_cork, DRBD_TCP_CORK_DEF) __flg_field_def(26, DRBD_GENLA_F_MANDATORY, tcp_cork, DRBD_TCP_CORK_DEF)
__flg_field_def(27, DRBD_GENLA_F_MANDATORY, always_asbp, DRBD_ALWAYS_ASBP_DEF) __flg_field_def(27, DRBD_GENLA_F_MANDATORY, always_asbp, DRBD_ALWAYS_ASBP_DEF)
__flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, dry_run) __flg_field(28, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, tentative)
__flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF) __flg_field_def(29, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF)
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment