diff options
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 83c5ae0ed56b..4222affff488 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -850,6 +850,7 @@ int drbd_connected(struct drbd_conf *mdev) | |||
850 | err = drbd_send_current_state(mdev); | 850 | err = drbd_send_current_state(mdev); |
851 | clear_bit(USE_DEGR_WFC_T, &mdev->flags); | 851 | clear_bit(USE_DEGR_WFC_T, &mdev->flags); |
852 | clear_bit(RESIZE_PENDING, &mdev->flags); | 852 | clear_bit(RESIZE_PENDING, &mdev->flags); |
853 | atomic_set(&mdev->ap_in_flight, 0); | ||
853 | mod_timer(&mdev->request_timer, jiffies + HZ); /* just start it here. */ | 854 | mod_timer(&mdev->request_timer, jiffies + HZ); /* just start it here. */ |
854 | return err; | 855 | return err; |
855 | } | 856 | } |
@@ -2266,7 +2267,7 @@ static int receive_Data(struct drbd_tconn *tconn, struct packet_info *pi) | |||
2266 | drbd_set_out_of_sync(mdev, peer_req->i.sector, peer_req->i.size); | 2267 | drbd_set_out_of_sync(mdev, peer_req->i.sector, peer_req->i.size); |
2267 | peer_req->flags |= EE_CALL_AL_COMPLETE_IO; | 2268 | peer_req->flags |= EE_CALL_AL_COMPLETE_IO; |
2268 | peer_req->flags &= ~EE_MAY_SET_IN_SYNC; | 2269 | peer_req->flags &= ~EE_MAY_SET_IN_SYNC; |
2269 | drbd_al_begin_io(mdev, &peer_req->i); | 2270 | drbd_al_begin_io(mdev, &peer_req->i, true); |
2270 | } | 2271 | } |
2271 | 2272 | ||
2272 | err = drbd_submit_peer_request(mdev, peer_req, rw, DRBD_FAULT_DT_WR); | 2273 | err = drbd_submit_peer_request(mdev, peer_req, rw, DRBD_FAULT_DT_WR); |
@@ -2662,7 +2663,6 @@ static int drbd_asb_recover_1p(struct drbd_conf *mdev) __must_hold(local) | |||
2662 | if (hg == -1 && mdev->state.role == R_PRIMARY) { | 2663 | if (hg == -1 && mdev->state.role == R_PRIMARY) { |
2663 | enum drbd_state_rv rv2; | 2664 | enum drbd_state_rv rv2; |
2664 | 2665 | ||
2665 | drbd_set_role(mdev, R_SECONDARY, 0); | ||
2666 | /* drbd_change_state() does not sleep while in SS_IN_TRANSIENT_STATE, | 2666 | /* drbd_change_state() does not sleep while in SS_IN_TRANSIENT_STATE, |
2667 | * we might be here in C_WF_REPORT_PARAMS which is transient. | 2667 | * we might be here in C_WF_REPORT_PARAMS which is transient. |
2668 | * we do not need to wait for the after state change work either. */ | 2668 | * we do not need to wait for the after state change work either. */ |
@@ -3993,7 +3993,7 @@ static int receive_state(struct drbd_tconn *tconn, struct packet_info *pi) | |||
3993 | 3993 | ||
3994 | clear_bit(DISCARD_MY_DATA, &mdev->flags); | 3994 | clear_bit(DISCARD_MY_DATA, &mdev->flags); |
3995 | 3995 | ||
3996 | drbd_md_sync(mdev); /* update connected indicator, la_size, ... */ | 3996 | drbd_md_sync(mdev); /* update connected indicator, la_size_sect, ... */ |
3997 | 3997 | ||
3998 | return 0; | 3998 | return 0; |
3999 | } | 3999 | } |
@@ -4660,8 +4660,8 @@ static int drbd_do_features(struct drbd_tconn *tconn) | |||
4660 | #if !defined(CONFIG_CRYPTO_HMAC) && !defined(CONFIG_CRYPTO_HMAC_MODULE) | 4660 | #if !defined(CONFIG_CRYPTO_HMAC) && !defined(CONFIG_CRYPTO_HMAC_MODULE) |
4661 | static int drbd_do_auth(struct drbd_tconn *tconn) | 4661 | static int drbd_do_auth(struct drbd_tconn *tconn) |
4662 | { | 4662 | { |
4663 | dev_err(DEV, "This kernel was build without CONFIG_CRYPTO_HMAC.\n"); | 4663 | conn_err(tconn, "This kernel was build without CONFIG_CRYPTO_HMAC.\n"); |
4664 | dev_err(DEV, "You need to disable 'cram-hmac-alg' in drbd.conf.\n"); | 4664 | conn_err(tconn, "You need to disable 'cram-hmac-alg' in drbd.conf.\n"); |
4665 | return -1; | 4665 | return -1; |
4666 | } | 4666 | } |
4667 | #else | 4667 | #else |
@@ -5258,9 +5258,11 @@ int drbd_asender(struct drbd_thread *thi) | |||
5258 | bool ping_timeout_active = false; | 5258 | bool ping_timeout_active = false; |
5259 | struct net_conf *nc; | 5259 | struct net_conf *nc; |
5260 | int ping_timeo, tcp_cork, ping_int; | 5260 | int ping_timeo, tcp_cork, ping_int; |
5261 | struct sched_param param = { .sched_priority = 2 }; | ||
5261 | 5262 | ||
5262 | current->policy = SCHED_RR; /* Make this a realtime task! */ | 5263 | rv = sched_setscheduler(current, SCHED_RR, ¶m); |
5263 | current->rt_priority = 2; /* more important than all other tasks */ | 5264 | if (rv < 0) |
5265 | conn_err(tconn, "drbd_asender: ERROR set priority, ret=%d\n", rv); | ||
5264 | 5266 | ||
5265 | while (get_t_state(thi) == RUNNING) { | 5267 | while (get_t_state(thi) == RUNNING) { |
5266 | drbd_thread_current_set_cpu(thi); | 5268 | drbd_thread_current_set_cpu(thi); |