diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2013-03-27 13:08:41 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-28 16:10:25 (GMT) |
commit | 7074e4a745799d521b17775f6d076d84dc7f8c50 (patch) | |
tree | a45461e71c8aaab46b8322fbaeb55e6d8710d057 /drivers/block/drbd/drbd_req.h | |
parent | 2bd5ed5d6713594eb2b4d234d01217d506279c7d (diff) | |
download | linux-7074e4a745799d521b17775f6d076d84dc7f8c50.tar.xz |
drbd: only fail empty flushes if no good data is reachable
We completed empty flushes (blkdev_issue_flush()) with IO error
if we lost the local disk, even if we still have an established
replication link to a healthy remote disk.
Fix this to only report errors to upper layers,
if neither local nor remote data is reachable.
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_req.h')
-rw-r--r-- | drivers/block/drbd/drbd_req.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_req.h b/drivers/block/drbd/drbd_req.h index c08d229..978cb1a 100644 --- a/drivers/block/drbd/drbd_req.h +++ b/drivers/block/drbd/drbd_req.h @@ -88,6 +88,14 @@ enum drbd_req_event { QUEUE_FOR_NET_READ, QUEUE_FOR_SEND_OOS, + /* An empty flush is queued as P_BARRIER, + * which will cause it to complete "successfully", + * even if the local disk flush failed. + * + * Just like "real" requests, empty flushes (blkdev_issue_flush()) will + * only see an error if neither local nor remote data is reachable. */ + QUEUE_AS_DRBD_BARRIER, + SEND_CANCELED, SEND_FAILED, HANDED_OVER_TO_NETWORK, |