summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-policy-smq.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2017-03-31 10:09:45 -0400
committerMike Snitzer <snitzer@redhat.com>2017-03-31 11:33:44 -0400
commit449b668ce0b9069fcaafa6344c7f10fa2ba9632e (patch)
tree6efb710aa1954bcb360f7562ea895b53ad5abf60 /drivers/md/dm-cache-policy-smq.c
parent7b81ef8b14f80033e4a4168d199a0f5fd79b9426 (diff)
downloadlinux-stable-449b668ce0b9069fcaafa6344c7f10fa2ba9632e.tar.gz
linux-stable-449b668ce0b9069fcaafa6344c7f10fa2ba9632e.tar.bz2
linux-stable-449b668ce0b9069fcaafa6344c7f10fa2ba9632e.zip
dm cache: set/clear the cache core's dirty_bitset when loading mappings
When loading metadata make sure to set/clear the dirty bits in the cache core's dirty_bitset as well as the policy. Otherwise the cache core is unaware that any blocks were dirty when the cache was last shutdown. A very serious side-effect being that the cleaner policy would therefore never be tasked with writing back dirty data from a cache that was in writeback mode (e.g. when switching from smq policy to cleaner policy when decommissioning a writeback cache). This fixes a serious data corruption bug associated with writeback mode. Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-policy-smq.c')
0 files changed, 0 insertions, 0 deletions