drbd: fix max_bio_size to be unsigned
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 25 Jun 2012 17:15:58 +0000 (19:15 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 24 Jul 2012 13:14:00 +0000 (15:14 +0200)
commitdb141b2f42b485b700465fe2401fbe65c65b190c
tree2af5670c18463173c7b9f5450bf09a90e463f986
parent7ee1fb93f390f7a7231abec4e34e6ab20abeed45
drbd: fix max_bio_size to be unsigned

We capped our max_bio_size respectively max_hw_sectors with
min_t(int, lower level limit, our limit);
unfortunately, some drivers, e.g. the kvm virtio block driver, initialize their
limits to "-1U", and that is of course a smaller "int" value than our limit.

Impact: we started to request 16 MB resync requests,
which lead to protocol error and a reconnect loop.

Fix all relevant constants and parameters to be unsigned int.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_nl.c