mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 05:04:00 +08:00
drbd: Improve readability of IO resuming after freeze due to no data access
The previous way of doing the state change was also okay since the state change on the susp flag gets propagated from the mdev to the tconn. Fortunately all this goes away in drbd-9.0 Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
88f79ec4ae
commit
892fdd1aee
@ -1187,21 +1187,25 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
|
|||||||
state change. This function might sleep */
|
state change. This function might sleep */
|
||||||
|
|
||||||
if (ns.susp_nod) {
|
if (ns.susp_nod) {
|
||||||
|
struct drbd_tconn *tconn = mdev->tconn;
|
||||||
enum drbd_req_event what = NOTHING;
|
enum drbd_req_event what = NOTHING;
|
||||||
|
|
||||||
if (os.conn < C_CONNECTED && conn_lowest_conn(mdev->tconn) >= C_CONNECTED)
|
spin_lock_irq(&tconn->req_lock);
|
||||||
|
if (os.conn < C_CONNECTED && conn_lowest_conn(tconn) >= C_CONNECTED)
|
||||||
what = RESEND;
|
what = RESEND;
|
||||||
|
|
||||||
if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) &&
|
if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) &&
|
||||||
conn_lowest_disk(mdev->tconn) > D_NEGOTIATING)
|
conn_lowest_disk(tconn) > D_NEGOTIATING)
|
||||||
what = RESTART_FROZEN_DISK_IO;
|
what = RESTART_FROZEN_DISK_IO;
|
||||||
|
|
||||||
if (what != NOTHING) {
|
if (tconn->susp_nod && what != NOTHING) {
|
||||||
spin_lock_irq(&mdev->tconn->req_lock);
|
_tl_restart(tconn, what);
|
||||||
_tl_restart(mdev->tconn, what);
|
_conn_request_state(tconn,
|
||||||
_drbd_set_state(_NS(mdev, susp_nod, 0), CS_VERBOSE, NULL);
|
(union drbd_state) { { .susp_nod = 1 } },
|
||||||
spin_unlock_irq(&mdev->tconn->req_lock);
|
(union drbd_state) { { .susp_nod = 0 } },
|
||||||
|
CS_VERBOSE);
|
||||||
}
|
}
|
||||||
|
spin_unlock_irq(&tconn->req_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ns.susp_fen) {
|
if (ns.susp_fen) {
|
||||||
|
Loading…
Reference in New Issue
Block a user