From: Lars Ellenberg Date: Wed, 27 Mar 2013 13:08:45 +0000 (+0100) Subject: drbd: fix drbd epoch write count for ahead/behind mode X-Git-Tag: omap-for-v3.10/fixes-for-merge-window-part2~10^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=607f25e56ee0a31e451f6bd8a7109fa1f5dcbe29;p=pandora-kernel.git drbd: fix drbd epoch write count for ahead/behind mode The sanity check when receiving P_BARRIER_ACK does expect all write requests with a given req->epoch to have been either all replicated, or all not replicated. Because req->epoch was assigned before calling maybe_pull_ahead(), this expectation was not met, leading to an off-by-one in the sanity check, and further to a "Protocol Error". Fix: move the call to maybe_pull_ahead() a few lines up, and assign req->epoch only after that. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe --- Reading git-diff-tree failed