aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-09-26 14:07:04 +0200
committerJens Axboe <axboe@kernel.dk>2012-10-30 08:39:18 +0100
commitccae7868b0c5697508a541c531cf96b361d62c1c (patch)
tree3263991e9b8f237808315d4c84cfe04bd2851475
parenta2a3c74f243d5d1793f89ccdceaa6918851f7fce (diff)
downloadvexpress-lsk-ccae7868b0c5697508a541c531cf96b361d62c1c.tar.gz
drbd: log request sector offset and size for IO errors
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>
-rw-r--r--drivers/block/drbd/drbd_req.c19
-rw-r--r--include/linux/drbd.h2
2 files changed, 19 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index d9e5962a9a8..135ea76ed50 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -387,6 +387,20 @@ out_conflict:
return 1;
}
+static void drbd_report_io_error(struct drbd_conf *mdev, struct drbd_request *req)
+{
+ char b[BDEVNAME_SIZE];
+
+ if (__ratelimit(&drbd_ratelimit_state))
+ return;
+
+ dev_warn(DEV, "local %s IO error sector %llu+%u on %s\n",
+ (req->rq_state & RQ_WRITE) ? "WRITE" : "READ",
+ (unsigned long long)req->sector,
+ req->size >> 9,
+ bdevname(mdev->ldev->backing_bdev, b));
+}
+
/* obviously this could be coded as many single functions
* instead of one huge switch,
* or by putting the code directly in the respective locations
@@ -455,6 +469,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
req->rq_state |= RQ_LOCAL_COMPLETED;
req->rq_state &= ~RQ_LOCAL_PENDING;
+ drbd_report_io_error(mdev, req);
__drbd_chk_io_error(mdev, DRBD_WRITE_ERROR);
_req_may_be_done_not_susp(req, m);
break;
@@ -477,6 +492,7 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what,
break;
}
+ drbd_report_io_error(mdev, req);
__drbd_chk_io_error(mdev, DRBD_READ_ERROR);
goto_queue_for_net_read:
@@ -900,7 +916,8 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns
if (!(local || remote) && !is_susp(mdev->state)) {
if (__ratelimit(&drbd_ratelimit_state))
- dev_err(DEV, "IO ERROR: neither local nor remote disk\n");
+ dev_err(DEV, "IO ERROR: neither local nor remote data, sector %llu+%u\n",
+ (unsigned long long)req->sector, req->size >> 9);
goto fail_free_complete;
}
diff --git a/include/linux/drbd.h b/include/linux/drbd.h
index 4a7eccbd129..94f58a102bb 100644
--- a/include/linux/drbd.h
+++ b/include/linux/drbd.h
@@ -53,7 +53,7 @@
extern const char *drbd_buildtag(void);
-#define REL_VERSION "8.3.13"
+#define REL_VERSION "8.3.14"
#define API_VERSION 88
#define PRO_VERSION_MIN 86
#define PRO_VERSION_MAX 97