summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorJoe Thornber2019-01-15 19:27:01 +0100
committerMike Snitzer2019-01-15 22:10:41 +0100
commitd445bd9cec1a850c2100fcf53684c13b3fd934f2 (patch)
treeabca30179b3fa5355959344f50c57dce9213ef55 /drivers/md/dm.c
parentdm crypt: fix parsing of extended IV arguments (diff)
downloadkernel-qcow2-linux-d445bd9cec1a850c2100fcf53684c13b3fd934f2.tar.gz
kernel-qcow2-linux-d445bd9cec1a850c2100fcf53684c13b3fd934f2.tar.xz
kernel-qcow2-linux-d445bd9cec1a850c2100fcf53684c13b3fd934f2.zip
dm thin: fix passdown_double_checking_shared_status()
Commit 00a0ea33b495 ("dm thin: do not queue freed thin mapping for next stage processing") changed process_prepared_discard_passdown_pt1() to increment all the blocks being discarded until after the passdown had completed to avoid them being prematurely reused. IO issued to a thin device that breaks sharing with a snapshot, followed by a discard issued to snapshot(s) that previously shared the block(s), results in passdown_double_checking_shared_status() being called to iterate through the blocks double checking their reference count is zero and issuing the passdown if so. So a side effect of commit 00a0ea33b495 is passdown_double_checking_shared_status() was broken. Fix this by checking if the block reference count is greater than 1. Also, rename dm_pool_block_is_used() to dm_pool_block_is_shared(). Fixes: 00a0ea33b495 ("dm thin: do not queue freed thin mapping for next stage processing") Cc: stable@vger.kernel.org # 4.9+ Reported-by: ryan.p.norwood@gmail.com Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
0 files changed, 0 insertions, 0 deletions