]> git.baikalelectronics.ru Git - kernel.git/commit
dm cache: when reloading a discard bitset allow for a different discard block size
authorJoe Thornber <ejt@redhat.com>
Mon, 24 Nov 2014 14:06:22 +0000 (14:06 +0000)
committerMike Snitzer <snitzer@redhat.com>
Mon, 1 Dec 2014 16:30:10 +0000 (11:30 -0500)
commit3fa5cc3260f442646459d0e368a5a91c9d946bf0
treed7ccfeacc50f7e3b730daad45f3ad11c70570153
parent8df07325260b53b6f053d67b26dac1591dfbfeae
dm cache: when reloading a discard bitset allow for a different discard block size

The discard block size can change if the origin changes size or if an
old DM cache is upgraded from using a discard block size that was equal
to cache block size.

To fix this an extent of discarded blocks is established for the purpose
of translating the old discard block size to the new in-core discard
block size and set bits.  The old (potentially huge) discard bitset is
left ondisk until it is re-written using the new in-core information on
the next successful DM cache shutdown.

Fixes: 3c2ce98f48ec ("dm cache: improve discard support")
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-target.c