Loading drivers/block/drbd/drbd_req.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -168,7 +168,7 @@ static void wake_all_senders(struct drbd_tconn *tconn) { } } /* must hold resource->req_lock */ /* must hold resource->req_lock */ static void start_new_tl_epoch(struct drbd_tconn *tconn) void start_new_tl_epoch(struct drbd_tconn *tconn) { { /* no point closing an epoch, if it is empty, anyways. */ /* no point closing an epoch, if it is empty, anyways. */ if (tconn->current_tle_writes == 0) if (tconn->current_tle_writes == 0) Loading drivers/block/drbd/drbd_req.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -267,6 +267,7 @@ struct bio_and_error { int error; int error; }; }; extern void start_new_tl_epoch(struct drbd_tconn *tconn); extern void drbd_req_destroy(struct kref *kref); extern void drbd_req_destroy(struct kref *kref); extern void _req_may_be_done(struct drbd_request *req, extern void _req_may_be_done(struct drbd_request *req, struct bio_and_error *m); struct bio_and_error *m); Loading drivers/block/drbd/drbd_state.c +7 −0 Original line number Original line Diff line number Diff line Loading @@ -931,6 +931,7 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns, enum drbd_state_rv rv = SS_SUCCESS; enum drbd_state_rv rv = SS_SUCCESS; enum sanitize_state_warnings ssw; enum sanitize_state_warnings ssw; struct after_state_chg_work *ascw; struct after_state_chg_work *ascw; bool did_remote, should_do_remote; os = drbd_read_state(mdev); os = drbd_read_state(mdev); Loading Loading @@ -981,11 +982,17 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns, (os.disk != D_DISKLESS && ns.disk == D_DISKLESS)) (os.disk != D_DISKLESS && ns.disk == D_DISKLESS)) atomic_inc(&mdev->local_cnt); atomic_inc(&mdev->local_cnt); did_remote = drbd_should_do_remote(mdev->state); mdev->state.i = ns.i; mdev->state.i = ns.i; should_do_remote = drbd_should_do_remote(mdev->state); mdev->tconn->susp = ns.susp; mdev->tconn->susp = ns.susp; mdev->tconn->susp_nod = ns.susp_nod; mdev->tconn->susp_nod = ns.susp_nod; mdev->tconn->susp_fen = ns.susp_fen; mdev->tconn->susp_fen = ns.susp_fen; /* put replicated vs not-replicated requests in seperate epochs */ if (did_remote != should_do_remote) start_new_tl_epoch(mdev->tconn); if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING) if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING) drbd_print_uuids(mdev, "attached to UUIDs"); drbd_print_uuids(mdev, "attached to UUIDs"); Loading Loading
drivers/block/drbd/drbd_req.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -168,7 +168,7 @@ static void wake_all_senders(struct drbd_tconn *tconn) { } } /* must hold resource->req_lock */ /* must hold resource->req_lock */ static void start_new_tl_epoch(struct drbd_tconn *tconn) void start_new_tl_epoch(struct drbd_tconn *tconn) { { /* no point closing an epoch, if it is empty, anyways. */ /* no point closing an epoch, if it is empty, anyways. */ if (tconn->current_tle_writes == 0) if (tconn->current_tle_writes == 0) Loading
drivers/block/drbd/drbd_req.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -267,6 +267,7 @@ struct bio_and_error { int error; int error; }; }; extern void start_new_tl_epoch(struct drbd_tconn *tconn); extern void drbd_req_destroy(struct kref *kref); extern void drbd_req_destroy(struct kref *kref); extern void _req_may_be_done(struct drbd_request *req, extern void _req_may_be_done(struct drbd_request *req, struct bio_and_error *m); struct bio_and_error *m); Loading
drivers/block/drbd/drbd_state.c +7 −0 Original line number Original line Diff line number Diff line Loading @@ -931,6 +931,7 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns, enum drbd_state_rv rv = SS_SUCCESS; enum drbd_state_rv rv = SS_SUCCESS; enum sanitize_state_warnings ssw; enum sanitize_state_warnings ssw; struct after_state_chg_work *ascw; struct after_state_chg_work *ascw; bool did_remote, should_do_remote; os = drbd_read_state(mdev); os = drbd_read_state(mdev); Loading Loading @@ -981,11 +982,17 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns, (os.disk != D_DISKLESS && ns.disk == D_DISKLESS)) (os.disk != D_DISKLESS && ns.disk == D_DISKLESS)) atomic_inc(&mdev->local_cnt); atomic_inc(&mdev->local_cnt); did_remote = drbd_should_do_remote(mdev->state); mdev->state.i = ns.i; mdev->state.i = ns.i; should_do_remote = drbd_should_do_remote(mdev->state); mdev->tconn->susp = ns.susp; mdev->tconn->susp = ns.susp; mdev->tconn->susp_nod = ns.susp_nod; mdev->tconn->susp_nod = ns.susp_nod; mdev->tconn->susp_fen = ns.susp_fen; mdev->tconn->susp_fen = ns.susp_fen; /* put replicated vs not-replicated requests in seperate epochs */ if (did_remote != should_do_remote) start_new_tl_epoch(mdev->tconn); if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING) if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING) drbd_print_uuids(mdev, "attached to UUIDs"); drbd_print_uuids(mdev, "attached to UUIDs"); Loading