aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_actlog.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-07-30 03:07:28 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:58:39 -0500
commit0c849666016cbf541c1030eec55f5f8dd1fba513 (patch)
tree35a49ef17d65375947404bd81759fc815bf09d5d /drivers/block/drbd/drbd_actlog.c
parentbf709c8552bcbbbc66ecc11555a781e814a037d8 (diff)
drbd: differentiate between normal and forced detach
Aborting local requests (not waiting for completion from the lower level disk) is dangerous: if the master bio has been completed to upper layers, data pages may be re-used for other things already. If local IO is still pending and later completes, this may cause crashes or corrupt unrelated data. Only abort local IO if explicitly requested. Intended use case is a lower level device that turned into a tarpit, not completing io requests, not even doing error completion. 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_actlog.c')
-rw-r--r--drivers/block/drbd/drbd_actlog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index f500dc5cdf52..209b2e063b92 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -445,7 +445,7 @@ _al_write_transaction(struct drbd_conf *mdev)
445 /* drbd_chk_io_error done already */ 445 /* drbd_chk_io_error done already */
446 else if (drbd_md_sync_page_io(mdev, mdev->ldev, sector, WRITE)) { 446 else if (drbd_md_sync_page_io(mdev, mdev->ldev, sector, WRITE)) {
447 err = -EIO; 447 err = -EIO;
448 drbd_chk_io_error(mdev, 1, true); 448 drbd_chk_io_error(mdev, 1, DRBD_META_IO_ERROR);
449 } else { 449 } else {
450 /* advance ringbuffer position and transaction counter */ 450 /* advance ringbuffer position and transaction counter */
451 mdev->al_tr_pos = (mdev->al_tr_pos + 1) % (MD_AL_SECTORS*512/MD_BLOCK_SIZE); 451 mdev->al_tr_pos = (mdev->al_tr_pos + 1) % (MD_AL_SECTORS*512/MD_BLOCK_SIZE);