aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2012-02-23 12:18:11 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:16 +0100
commit93f5afe9560b80e03a58ba5324ec71124df7655f (patch)
tree784ca2ed3d54a91dbd46aec7d479c649374075c7 /drivers
parent32db80f6f6326617ed40b2d157709226af4f062b (diff)
downloadvexpress-lsk-93f5afe9560b80e03a58ba5324ec71124df7655f.tar.gz
drbd: If disk timeout expires fail only the affected volume
...and not all volumes of the resource Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_req.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index e9a2f238b89..4737ad1f94b 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -1153,6 +1153,7 @@ void request_timer_fn(unsigned long data)
struct drbd_conf *mdev = (struct drbd_conf *) data;
struct drbd_tconn *tconn = mdev->tconn;
struct drbd_request *req; /* oldest request */
+ struct block_device *bdev;
struct list_head *le;
struct net_conf *nc;
unsigned long ent = 0, dt = 0, et, nt; /* effective timeout = ko_count * timeout */
@@ -1163,6 +1164,7 @@ void request_timer_fn(unsigned long data)
if (get_ldev(mdev)) {
dt = rcu_dereference(mdev->ldev->disk_conf)->disk_timeout * HZ / 10;
+ bdev = mdev->ldev->backing_bdev;
put_ldev(mdev);
}
rcu_read_unlock();
@@ -1188,7 +1190,7 @@ void request_timer_fn(unsigned long data)
_drbd_set_state(_NS(mdev, conn, C_TIMEOUT), CS_VERBOSE | CS_HARD, NULL);
}
}
- if (dt && req->rq_state & RQ_LOCAL_PENDING) {
+ if (dt && req->rq_state & RQ_LOCAL_PENDING && req->private_bio->bi_bdev == bdev) {
if (time_is_before_eq_jiffies(req->start_time + dt)) {
dev_warn(DEV, "Local backing device failed to meet the disk-timeout\n");
__drbd_chk_io_error(mdev, 1);