]> git.baikalelectronics.ru Git - kernel.git/commit
drbd: Take a more conservative approach when deciding max_bio_size
authorPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 20 May 2011 14:39:13 +0000 (16:39 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 24 May 2011 08:08:58 +0000 (10:08 +0200)
commit4bd810694ffb0f4e56871bf517dfe04b059dd8fd
tree0b86df2b3e86af1eab14b987e81b7f4a5f88c090
parent6412a7cd7606492d1b41462b799584929bbef26c
drbd: Take a more conservative approach when deciding max_bio_size

The old (optimistic) implementation could shrink the bio size
on an primary device.

Shrinking the bio size on a primary device is bad. Since there
we might get BIOs with the old (bigger) size shortly after
we published the new size.

The new implementation is more conservative, and eventually
increases the max_bio_size on a primary device (which is valid).
It does so, when it knows the local limit AND the remote limit.

 We cache the last seen max_bio_size of the peer in the meta
 data, and rely on that, to make the operation of single
 nodes more efficient.

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
drivers/block/drbd/drbd_receiver.c