diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2014-04-28 18:43:13 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-30 13:46:54 -0600 |
commit | d7fe69c6a1940c3f9c5bed08634b6dd868612cdf (patch) | |
tree | a58b3e1e0bd3c420e94b85d963e73e33d915dfeb /drivers/block/drbd/drbd_nl.c | |
parent | 31007745a5f328b8d70d865c4a6118be01421b8c (diff) | |
download | blackbird-op-linux-d7fe69c6a1940c3f9c5bed08634b6dd868612cdf.tar.gz blackbird-op-linux-d7fe69c6a1940c3f9c5bed08634b6dd868612cdf.zip |
drbd: Leave IO suspended if the fence handler find the peer primary
Actually we are clearing the susp_fen flag if we are not going
to call a fencing handler.
For setting the susp_fen flag needs to be edge-triggerd, and not
level triggered.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 526414bc2cab..5ccbd7164c78 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -426,6 +426,14 @@ static enum drbd_fencing_p highest_fencing_policy(struct drbd_connection *connec } rcu_read_unlock(); + if (fp == FP_NOT_AVAIL) { + /* IO Suspending works on the whole resource. + Do it only for one device. */ + vnr = 0; + peer_device = idr_get_next(&connection->peer_devices, &vnr); + drbd_change_state(peer_device->device, CS_VERBOSE | CS_HARD, NS(susp_fen, 0)); + } + return fp; } |