From: Joe Thornber Date: Wed, 20 Mar 2013 17:21:25 +0000 (+0000) Subject: dm thin: fix non power of two discard granularity calc X-Git-Tag: v3.9-rc4~20^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58051b94e05a59c4d34f9f1a441af40894817c59;p=pandora-kernel.git dm thin: fix non power of two discard granularity calc Fix a discard granularity calculation to work for non power of 2 block sizes. In order for thinp to passdown discard bios to the underlying data device, the data device must have a discard granularity that is a factor of the thinp block size. Originally this check was done by using bitops since the block_size was known to be a power of two. Introduced by commit f13945d75730081830b6f3360266950e2b7c9067 ("dm thin: support a non power of 2 discard_granularity"). Signed-off-by: Joe Thornber Signed-off-by: Alasdair G Kergon --- Reading git-diff-tree failed