Skip to contentSkip to conversation

ko-count overflow

Drbd-dev Apollonskiy Evgeniy 2 participants 2 messages Feb 25, 2012 DRBD driver

lore
Share & tools
lore
maintainer
#1 lore raw
In reply to Apollonskiy Evgeniy
Quoted 11 lines · Apollonskiy Evgeniy

Hello,

There is a strange code fragment in drbd_main.c:

	drop_it = !--mdev->ko_count;
	if (!drop_it) {
		dev_err(DEV, "[%s/%d] sock_sendmsg time expired, ko = %u\n",
		       current->comm, current->pid, mdev->ko_count);
		request_ping(mdev);
	}
Quoted 2 lines

Default value of ko_count is 0, so --mdev->ko_count will be equal to 4294967295 (ko_count is unsigned int).

That is intentional.

Configuring "0" should be equivalent to "disabled",
but we still want the recurring log message with the "count down".

Signature · 3 lines
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
#0 lore raw

Hello,

There is a strange code fragment in drbd_main.c:

	drop_it = !--mdev->ko_count;
	if (!drop_it) {
		dev_err(DEV, "[%s/%d] sock_sendmsg time expired, ko = %u\n",
		       current->comm, current->pid, mdev->ko_count);
		request_ping(mdev);
	}

Default value of ko_count is 0, so --mdev->ko_count will be equal to 4294967295 (ko_count is unsigned int).