aboutsummaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2014-03-20 10:11:15 -0400
committerMister Oyster <oysterized@gmail.com>2018-01-02 13:54:52 +0100
commit179c6e45500ae028a4032088856dfd12f23945dd (patch)
tree3cbaa3ac12a2c68d6a7cacd59015e0d1d6211525 /scripts/basic
parentc9cb9ed64be7e8112bf56048f708019eb7957417 (diff)
dm cache: prevent corruption caused by discard_block_size > cache_block_size
If the discard block size is larger than the cache block size we will not properly quiesce IO to a region that is about to be discarded. This results in a race between a cache migration where no copy is needed, and a write to an adjacent cache block that's within the same large discard block. Workaround this by limiting the discard_block_size to cache_block_size. Also limit the max_discard_sectors to cache_block_size. A more comprehensive fix that introduces range locking support in the bio_prison and proper quiescing of a discard range that spans multiple cache blocks is already in development. Reported-by: Morgan Mears <Morgan.Mears@netapp.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Joe Thornber <ejt@redhat.com> Acked-by: Heinz Mauelshagen <heinzm@redhat.com> Cc: stable@vger.kernel.org [@nathanchance: fixed conflicts] Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions