From: Lars Ellenberg Date: Wed, 15 Dec 2010 22:21:39 +0000 (+0100) Subject: drbd: bitmap: don't count unused bits (fix non-terminating resync) X-Git-Tag: v2.6.39-rc1~37^2~60 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7777a8ba1fc980e5edfe492ebf5a1676497b8db2;p=pandora-kernel.git drbd: bitmap: don't count unused bits (fix non-terminating resync) We trusted the on-disk bitmap to have unused bits cleared. In case that is not true for whatever reason, and we take a code path where the unused bits don't get cleared elsewhere (bm_clear_surplus is not called), we may miscount the bits, and get confused during resync, waiting for bits to get cleared that we don't even use: the resync process would not terminate. Fix this by masking out unused bits in __bm_count_bits. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- Reading git-diff-tree failed