drbd: fix drbd wire compatibility for empty flushes
authorLars Ellenberg <lars.ellenberg@linbit.com>
Tue, 31 Jul 2012 07:31:11 +0000 (09:31 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 16 Aug 2012 15:12:56 +0000 (17:12 +0200)
commit227f052f4711caf432b9a7dbcfe1a2857d3c0def
treea8e7a59fbe8a8c9d5e0ecbe76db9a9c769fd7e30
parenta73ff3231df59a4b92ccd0dd4e73897c5822489b
drbd: fix drbd wire compatibility for empty flushes

DRBD has a concept of request epochs or reorder-domains,
which are separated on the wire by P_BARRIER packets.

Older DRBD is not able to handle zero-sized requests at all,
so we need to map empty flushes to these drbd barriers.

These are the equivalent of empty flushes, and
by default trigger flushes on the receiving side anyways
(unless not supported or explicitly disabled),
so there is no need to handle this differently in newer drbd either.

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