aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_bitmap.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-09-27 07:03:45 -0400
committerJens Axboe <axboe@kernel.dk>2012-10-30 03:39:18 -0400
commit44edfb0d785ea06712b5a717fa2c1ae34e300845 (patch)
treeb886731330dc8b153f033d7c16729c47b146a026 /drivers/block/drbd/drbd_bitmap.c
parent8b45a5c8a190d0ea0077928fd8e95c0752e40e41 (diff)
drbd: wait for meta data IO completion even with failed disk, unless force-detached
The intention of force-detach is to be able to deal with a completely unresponsive lower level IO stack, which does not even deliver error completions anymore, but no completion at all. In all other cases, we must still wait for the meta data IO completion. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/drbd/drbd_bitmap.c')
-rw-r--r--drivers/block/drbd/drbd_bitmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index dda4e384929e..8d8069758042 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -1090,7 +1090,7 @@ static int bm_rw(struct drbd_conf *mdev, int rw, unsigned flags, unsigned lazy_w
1090 * "in_flight reached zero, all done" event. 1090 * "in_flight reached zero, all done" event.
1091 */ 1091 */
1092 if (!atomic_dec_and_test(&ctx->in_flight)) 1092 if (!atomic_dec_and_test(&ctx->in_flight))
1093 wait_until_done_or_disk_failure(mdev, mdev->ldev, &ctx->done); 1093 wait_until_done_or_force_detached(mdev, mdev->ldev, &ctx->done);
1094 else 1094 else
1095 kref_put(&ctx->kref, &bm_aio_ctx_destroy); 1095 kref_put(&ctx->kref, &bm_aio_ctx_destroy);
1096 1096
@@ -1105,7 +1105,7 @@ static int bm_rw(struct drbd_conf *mdev, int rw, unsigned flags, unsigned lazy_w
1105 } 1105 }
1106 1106
1107 if (atomic_read(&ctx->in_flight)) 1107 if (atomic_read(&ctx->in_flight))
1108 err = -EIO; /* Disk failed during IO... */ 1108 err = -EIO; /* Disk timeout/force-detach during IO... */
1109 1109
1110 now = jiffies; 1110 now = jiffies;
1111 if (rw == WRITE) { 1111 if (rw == WRITE) {
@@ -1224,11 +1224,11 @@ int drbd_bm_write_page(struct drbd_conf *mdev, unsigned int idx) __must_hold(loc
1224 } 1224 }
1225 1225
1226 bm_page_io_async(ctx, idx, WRITE_SYNC); 1226 bm_page_io_async(ctx, idx, WRITE_SYNC);
1227 wait_until_done_or_disk_failure(mdev, mdev->ldev, &ctx->done); 1227 wait_until_done_or_force_detached(mdev, mdev->ldev, &ctx->done);
1228 1228
1229 if (ctx->error) 1229 if (ctx->error)
1230 drbd_chk_io_error(mdev, 1, DRBD_META_IO_ERROR); 1230 drbd_chk_io_error(mdev, 1, DRBD_META_IO_ERROR);
1231 /* that should force detach, so the in memory bitmap will be 1231 /* that causes us to detach, so the in memory bitmap will be
1232 * gone in a moment as well. */ 1232 * gone in a moment as well. */
1233 1233
1234 mdev->bm_writ_cnt++; 1234 mdev->bm_writ_cnt++;