dm vdo: add the recovery journal
authorMatthew Sakai <msakai@redhat.com>
Fri, 17 Nov 2023 02:07:26 +0000 (21:07 -0500)
committerMike Snitzer <snitzer@kernel.org>
Tue, 20 Feb 2024 18:43:15 +0000 (13:43 -0500)
commit95a72357688803736bf60db973cbf94c0ff3a6da
tree5068fad1f7f7d7cf093ca5e8f438b5042b99359b
parent14d531d7b7a124151c54f05e929d6e6fa896b68d
dm vdo: add the recovery journal

The recovery journal is used to amortize updates across the block map and
slab depot. Each write request causes an entry to be made in the journal.
Entries are either "data remappings" or "block map remappings." For a data
remapping, the journal records the logical address affected and its old and
new physical mappings. For a block map remapping, the journal records the
block map page number and the physical block allocated for it (block map
pages are never reclaimed, so the old mapping is always 0). Each journal
entry and the data write it represents must be stable on disk before the
other metadata structures may be updated to reflect the operation.

Co-developed-by: J. corwin Coburn <corwin@hurlbutnet.net>
Signed-off-by: J. corwin Coburn <corwin@hurlbutnet.net>
Co-developed-by: Michael Sclafani <dm-devel@lists.linux.dev>
Signed-off-by: Michael Sclafani <dm-devel@lists.linux.dev>
Co-developed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-vdo/recovery-journal.c [new file with mode: 0644]
drivers/md/dm-vdo/recovery-journal.h [new file with mode: 0644]