提交 07194272 编写于 作者: L Lars Ellenberg 提交者: Philipp Reisner

drbd: ratelimit io error messages

Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 3f98688a
...@@ -165,11 +165,12 @@ void drbd_endio_sec(struct bio *bio, int error) ...@@ -165,11 +165,12 @@ 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) {
if (__ratelimit(&drbd_ratelimit_state))
dev_warn(DEV, "%s: setting error to -EIO s=%llus\n", dev_warn(DEV, "%s: setting error to -EIO s=%llus\n",
is_write ? "write" : "read", is_write ? "write" : "read",
(unsigned long long)e->sector); (unsigned long long)e->sector);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册