diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-14 08:01:50 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-05-09 04:16:04 -0400 |
commit | 2b4dd36fbae7203a0d503a6cede1f4ce17aa72ac (patch) | |
tree | 09ad826a0203980e3ae54c1917a3a6badf51b773 /drivers/block/drbd/drbd_main.c | |
parent | 6d7e32f56806ad58006720ed98a433b2047444da (diff) |
drbd: Immediately allow completion of IOs, that wait for IO completions on a failed disk
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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 8e489a6d022e..16969c2b96cd 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -368,6 +368,12 @@ static void _tl_restart(struct drbd_conf *mdev, enum drbd_req_event what) | |||
368 | } | 368 | } |
369 | tmp = b->next; | 369 | tmp = b->next; |
370 | 370 | ||
371 | if (what == abort_disk_io) { | ||
372 | /* Only walk the TL, leave barrier objects in place */ | ||
373 | b = tmp; | ||
374 | continue; | ||
375 | } | ||
376 | |||
371 | if (n_writes) { | 377 | if (n_writes) { |
372 | if (what == resend) { | 378 | if (what == resend) { |
373 | b->n_writes = n_writes; | 379 | b->n_writes = n_writes; |
@@ -1565,6 +1571,10 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, | |||
1565 | eh = mdev->ldev->dc.on_io_error; | 1571 | eh = mdev->ldev->dc.on_io_error; |
1566 | was_io_error = test_and_clear_bit(WAS_IO_ERROR, &mdev->flags); | 1572 | was_io_error = test_and_clear_bit(WAS_IO_ERROR, &mdev->flags); |
1567 | 1573 | ||
1574 | /* Immediately allow completion of all application IO, that waits | ||
1575 | for completion from the local disk. */ | ||
1576 | tl_restart(mdev, abort_disk_io); | ||
1577 | |||
1568 | /* current state still has to be D_FAILED, | 1578 | /* current state still has to be D_FAILED, |
1569 | * there is only one way out: to D_DISKLESS, | 1579 | * there is only one way out: to D_DISKLESS, |
1570 | * and that may only happen after our put_ldev below. */ | 1580 | * and that may only happen after our put_ldev below. */ |