]> git.baikalelectronics.ru Git - kernel.git/commit
dm clone metadata: Track exact changes per transaction
authorNikos Tsironis <ntsironis@arrikto.com>
Wed, 4 Dec 2019 14:06:52 +0000 (16:06 +0200)
committerMike Snitzer <snitzer@redhat.com>
Thu, 5 Dec 2019 20:27:53 +0000 (15:27 -0500)
commite0448790d7fc5f45c004813ea317eeb031fd93e0
tree8b2f6f9a3970094f008743b3883f9480cc45589b
parent15f04f1bedcf8a27eca54ea2674fe8e69025a3c7
dm clone metadata: Track exact changes per transaction

Extend struct dirty_map with a second bitmap which tracks the exact
regions that were hydrated during the current metadata transaction.

Moreover, fix __flush_dmap() to only commit the metadata of the regions
that were hydrated during the current transaction.

This is required by the following commits to fix a data corruption bug.

Fixes: 926c5639707c ("dm: add clone target")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-clone-metadata.c