diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-11-10 06:08:37 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:35:06 -0500 |
commit | 3719094ec2dec411b3151f10048316d787e086f9 (patch) | |
tree | 4be7bd2bb31612e8210665b9e20985de7deb30e4 /drivers/block/drbd/drbd_main.c | |
parent | ab17b68f4579b460753a416b0afc4446381d876f (diff) |
drbd: Starting with protocol 96 we can allow app-IO while receiving the bitmap
* C_STARTING_SYNC_S, C_STARTING_SYNC_T In these states the bitmap gets
written to disk. Locking out of app-IO is done by using the
drbd_queue_bitmap_io() and drbd_bitmap_io() functions these days.
It is no longer necessary to lock out app-IO based on the connection
state.
App-IO that may come in after the BITMAP_IO flag got cleared before the
state transition to C_SYNC_(SOURCE|TARGET) does not get mirrored, sets
a bit in the local bitmap, that is already set, therefore changes nothing.
* C_WF_BITMAP_S In this state we send updates (P_OUT_OF_SYNC packets).
With that we make sure they have the same number of bits when going
into the C_SYNC_(SOURCE|TARGET) connection state.
* C_UNCONNECTED: The receiver starts, no need to lock out IO.
* C_DISCONNECTING: in drbd_disconnect() we had a wait_event()
to wait until ap_bio_cnt reaches 0. Removed that.
* C_TIMEOUT, C_BROKEN_PIPE, C_NETWORK_FAILURE
C_PROTOCOL_ERROR, C_TEAR_DOWN: Same as C_DISCONNECTING
* C_WF_REPORT_PARAMS: IO still possible since that is still
like C_WF_CONNECTION.
And we do not need to send barriers in C_WF_BITMAP_S connection state.
Allow concurrent accesses to the bitmap when receiving the bitmap.
Everything gets ORed anyways.
A drbd_free_tl_hash() is in after_state_chg_work(). At that point
all the work items of the last connections must have been processed.
Introduced a call to drbd_free_tl_hash() into drbd_free_mdev()
for paranoia reasons.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 74a6d55259af..14afbd4e53a5 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -3334,6 +3334,7 @@ void drbd_free_mdev(struct drbd_conf *mdev) | |||
3334 | put_disk(mdev->vdisk); | 3334 | put_disk(mdev->vdisk); |
3335 | blk_cleanup_queue(mdev->rq_queue); | 3335 | blk_cleanup_queue(mdev->rq_queue); |
3336 | free_cpumask_var(mdev->cpu_mask); | 3336 | free_cpumask_var(mdev->cpu_mask); |
3337 | drbd_free_tl_hash(mdev); | ||
3337 | kfree(mdev); | 3338 | kfree(mdev); |
3338 | } | 3339 | } |
3339 | 3340 | ||