mask = convert_state(mask);
val = convert_state(val);
- rv = conn_request_state(tconn, mask, val, CS_VERBOSE | CS_LOCAL_ONLY);
+ rv = conn_request_state(tconn, mask, val, CS_VERBOSE | CS_LOCAL_ONLY | CS_IGN_OUTD_FAIL);
conn_send_sr_reply(tconn, rv);
return 0;
os = mdev->state;
ns = sanitize_state(mdev, apply_mask_val(os, mask, val), NULL);
+ if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED)
+ ns.disk = os.disk;
+
if (ns.i == os.i)
continue;
ns = apply_mask_val(os, mask, val);
ns = sanitize_state(mdev, ns, NULL);
+ if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED)
+ ns.disk = os.disk;
+
rv = __drbd_set_state(mdev, ns, flags, NULL);
if (rv < SS_SUCCESS)
BUG();
CS_DC_DISK = 1 << 8,
CS_DC_PDSK = 1 << 9,
CS_DC_MASK = CS_DC_ROLE + CS_DC_PEER + CS_DC_CONN + CS_DC_DISK + CS_DC_PDSK,
+ CS_IGN_OUTD_FAIL = 1 << 10,
};
extern enum drbd_state_rv drbd_change_state(struct drbd_conf *mdev,