From: Heinz Mauelshagen Date: Thu, 27 Feb 2014 21:46:48 +0000 (+0100) Subject: dm cache: fix truncation bug when mapping I/O to >2TB fast device X-Git-Tag: v3.14-rc5~11^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0d849fad746cb36a6822e4595d8ba9bf0adf7fa;p=pandora-kernel.git dm cache: fix truncation bug when mapping I/O to >2TB fast device When remapping a block to the cache's fast device that is larger than 2TB we must not truncate the destination sector to 32bits. The 32bit temporary result of from_cblock() was being overflowed in remap_to_cache() due to the logical left shift. Use an intermediate 64bit type to store the 32bit from_cblock() result to fix the overflow. Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org --- Reading git-diff-tree failed