diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-27 05:12:07 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:34:45 -0500 |
commit | 422028b1ca4c07995af82a18abced022ff4c296c (patch) | |
tree | 87583c3aab3d8b39c5210de800d5eae79941dc25 /drivers/block | |
parent | 759fbdfba66e620aceb3e73167e6003d1b8b0b0b (diff) |
drbd: New configuration parameters for dealing with network congestion
net {
on_congestion {block|pull-ahead|disconnect};
congestion-fill {sectors};
congestion-extents {al-extents};
}
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 9e27d82a9a19..f969d8717e23 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -1323,6 +1323,8 @@ static int drbd_nl_net_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, | |||
1323 | new_conf->wire_protocol = DRBD_PROT_C; | 1323 | new_conf->wire_protocol = DRBD_PROT_C; |
1324 | new_conf->ping_timeo = DRBD_PING_TIMEO_DEF; | 1324 | new_conf->ping_timeo = DRBD_PING_TIMEO_DEF; |
1325 | new_conf->rr_conflict = DRBD_RR_CONFLICT_DEF; | 1325 | new_conf->rr_conflict = DRBD_RR_CONFLICT_DEF; |
1326 | new_conf->on_congestion = DRBD_ON_CONGESTION_DEF; | ||
1327 | new_conf->cong_extents = DRBD_CONG_EXTENTS_DEF; | ||
1326 | 1328 | ||
1327 | if (!net_conf_from_tags(mdev, nlp->tag_list, new_conf)) { | 1329 | if (!net_conf_from_tags(mdev, nlp->tag_list, new_conf)) { |
1328 | retcode = ERR_MANDATORY_TAG; | 1330 | retcode = ERR_MANDATORY_TAG; |
@@ -1344,6 +1346,11 @@ static int drbd_nl_net_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, | |||
1344 | } | 1346 | } |
1345 | } | 1347 | } |
1346 | 1348 | ||
1349 | if (new_conf->on_congestion != OC_BLOCK && new_conf->wire_protocol != DRBD_PROT_A) { | ||
1350 | retcode = ERR_CONG_NOT_PROTO_A; | ||
1351 | goto fail; | ||
1352 | } | ||
1353 | |||
1347 | if (mdev->state.role == R_PRIMARY && new_conf->want_lose) { | 1354 | if (mdev->state.role == R_PRIMARY && new_conf->want_lose) { |
1348 | retcode = ERR_DISCARD; | 1355 | retcode = ERR_DISCARD; |
1349 | goto fail; | 1356 | goto fail; |