diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2014-03-12 00:40:05 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-23 21:44:17 -0700 |
commit | 29344f5af8f0fb1c226dc7281ee710ee4ca4bec6 (patch) | |
tree | 3062353eb64aa062e9b0f2f585fdece22e1ebf00 /drivers/spi/spi-fsl-lib.c | |
parent | 3c47ea5b587d5bb1d63657e0eb34f6fd1e7b0e15 (diff) |
dm cache: fix truncation bug when copying a block to/from >2TB fast device
commit 8b9d96666529a979acf4825391efcc7c8a3e9f12 upstream.
During demotion or promotion to a cache's >2TB fast device we must not
truncate the cache block's associated sector to 32bits. The 32bit
temporary result of from_cblock() caused a 32bit multiplication when
calculating the sector of the fast device in issue_copy_real().
Use an intermediate 64bit type to store the 32bit from_cblock() to allow
for proper 64bit multiplication.
Here is an example of how this bug manifests on an ext4 filesystem:
EXT4-fs error (device dm-0): ext4_mb_generate_buddy:756: group 17136, 32768 clusters in bitmap, 30688 in gd; block bitmap corrupt.
JBD2: Spotted dirty metadata buffer (dev = dm-0, blocknr = 0). There's a risk of filesystem corruption in case of system crash.
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spi/spi-fsl-lib.c')
0 files changed, 0 insertions, 0 deletions