From: Joe Thornber Date: Fri, 23 Jan 2015 10:00:07 +0000 (+0000) Subject: dm cache: share cache-metadata object across inactive and active DM tables X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~232^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b1cc9f251affdd27f29fe46d0989ba76c33faf6;p=pandora-kernel.git dm cache: share cache-metadata object across inactive and active DM tables If a DM table is reloaded with an inactive table when the device is not suspended (normal procedure for LVM2), then there will be two dm-bufio objects that can diverge. This can lead to a situation where the inactive table uses bufio to read metadata at the same time the active table writes metadata -- resulting in the inactive table having stale metadata buffers once it is promoted to the active table slot. Fix this by using reference counting and a global list of cache metadata objects to ensure there is only one metadata object per metadata device. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer Cc: stable@vger.kernel.org --- Reading git-diff-tree failed