diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-02 18:21:30 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-05-24 03:59:49 -0400 |
commit | 738a84b25cac5af94936e5a1b15cd9909212383c (patch) | |
tree | ebed88ad337d18ca5f0f29eb938894381c10311d /drivers/block/drbd/drbd_main.c | |
parent | 779d530632c98967820d3bbcae15d492fc20301e (diff) |
drbd: Fix for application IO with the on-io-error=pass-on policy
In case a write failes on the local disk, go into D_INCONSISTENT
disk state. That causes future reads of that block to be shipped
to the peer.
Read retry remote was already in place.
Actually the documentation needs to get fixed now. Since the
application is still shielded from the error. (as long as we have
only a single disk failing) The difference to detach is that
we keep the disk. And therefore might keep all the other, still
working sectors up to date.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 5b525c179f39..fd308864833f 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -1565,6 +1565,10 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, | |||
1565 | put_ldev(mdev); | 1565 | put_ldev(mdev); |
1566 | } | 1566 | } |
1567 | 1567 | ||
1568 | /* Notify peer that I had a local IO error, and did not detached.. */ | ||
1569 | if (os.disk == D_UP_TO_DATE && ns.disk == D_INCONSISTENT) | ||
1570 | drbd_send_state(mdev); | ||
1571 | |||
1568 | /* Disks got bigger while they were detached */ | 1572 | /* Disks got bigger while they were detached */ |
1569 | if (ns.disk > D_NEGOTIATING && ns.pdsk > D_NEGOTIATING && | 1573 | if (ns.disk > D_NEGOTIATING && ns.pdsk > D_NEGOTIATING && |
1570 | test_and_clear_bit(RESYNC_AFTER_NEG, &mdev->flags)) { | 1574 | test_and_clear_bit(RESYNC_AFTER_NEG, &mdev->flags)) { |