Commit 07194272 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner

drbd: ratelimit io error messages

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 3f98688a
...@@ -165,14 +165,15 @@ void drbd_endio_sec(struct bio *bio, int error) ...@@ -165,14 +165,15 @@ void drbd_endio_sec(struct bio *bio, int error)
int uptodate = bio_flagged(bio, BIO_UPTODATE); int uptodate = bio_flagged(bio, BIO_UPTODATE);
int is_write = bio_data_dir(bio) == WRITE; int is_write = bio_data_dir(bio) == WRITE;
if (error) if (error && __ratelimit(&drbd_ratelimit_state))
dev_warn(DEV, "%s: error=%d s=%llus\n", dev_warn(DEV, "%s: error=%d s=%llus\n",
is_write ? "write" : "read", error, is_write ? "write" : "read", error,
(unsigned long long)e->sector); (unsigned long long)e->sector);
if (!error && !uptodate) { if (!error && !uptodate) {
dev_warn(DEV, "%s: setting error to -EIO s=%llus\n", if (__ratelimit(&drbd_ratelimit_state))
is_write ? "write" : "read", dev_warn(DEV, "%s: setting error to -EIO s=%llus\n",
(unsigned long long)e->sector); is_write ? "write" : "read",
(unsigned long long)e->sector);
/* strange behavior of some lower level drivers... /* strange behavior of some lower level drivers...
* fail the request by clearing the uptodate flag, * fail the request by clearing the uptodate flag,
* but do not return any error?! */ * but do not return any error?! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment