diff options
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 0c1e84a751d..668f0637821 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -2660,9 +2660,24 @@ static void drbd_unplug_fn(struct request_queue *q) | |||
2660 | 2660 | ||
2661 | static void drbd_set_defaults(struct drbd_conf *mdev) | 2661 | static void drbd_set_defaults(struct drbd_conf *mdev) |
2662 | { | 2662 | { |
2663 | mdev->sync_conf.after = DRBD_AFTER_DEF; | 2663 | /* This way we get a compile error when sync_conf grows, |
2664 | mdev->sync_conf.rate = DRBD_RATE_DEF; | 2664 | and we forgot to initialize it here */ |
2665 | mdev->sync_conf.al_extents = DRBD_AL_EXTENTS_DEF; | 2665 | mdev->sync_conf = (struct syncer_conf) { |
2666 | /* .rate = */ DRBD_RATE_DEF, | ||
2667 | /* .after = */ DRBD_AFTER_DEF, | ||
2668 | /* .al_extents = */ DRBD_AL_EXTENTS_DEF, | ||
2669 | /* .dp_volume = */ DRBD_DP_VOLUME_DEF, | ||
2670 | /* .dp_interval = */ DRBD_DP_INTERVAL_DEF, | ||
2671 | /* .throttle_th = */ DRBD_RS_THROTTLE_TH_DEF, | ||
2672 | /* .hold_off_th = */ DRBD_RS_HOLD_OFF_TH_DEF, | ||
2673 | /* .verify_alg = */ {}, 0, | ||
2674 | /* .cpu_mask = */ {}, 0, | ||
2675 | /* .csums_alg = */ {}, 0, | ||
2676 | /* .use_rle = */ 0 | ||
2677 | }; | ||
2678 | |||
2679 | /* Have to use that way, because the layout differs between | ||
2680 | big endian and little endian */ | ||
2666 | mdev->state = (union drbd_state) { | 2681 | mdev->state = (union drbd_state) { |
2667 | { .role = R_SECONDARY, | 2682 | { .role = R_SECONDARY, |
2668 | .peer = R_UNKNOWN, | 2683 | .peer = R_UNKNOWN, |