Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

drbd: ratelimit io error messages

parent 3f98688a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -165,11 +165,12 @@ void drbd_endio_sec(struct bio *bio, int error)
	int uptodate = bio_flagged(bio, BIO_UPTODATE);
	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",
				is_write ? "write" : "read", error,
				(unsigned long long)e->sector);
	if (!error && !uptodate) {
		if (__ratelimit(&drbd_ratelimit_state))
			dev_warn(DEV, "%s: setting error to -EIO s=%llus\n",
					is_write ? "write" : "read",
					(unsigned long long)e->sector);