]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm vdo: add formatting logic and initialization
authorBruce Johnston <bjohnsto@redhat.com>
Tue, 24 Mar 2026 18:06:51 +0000 (14:06 -0400)
committerMikulas Patocka <mpatocka@redhat.com>
Thu, 26 Mar 2026 17:19:15 +0000 (18:19 +0100)
commitdefce4e039bc0100164964f79e896d05cb45dc76
treee224e3b5cddd23843bf6aa88fc795bdd233e9f46
parent9d9c28aa867ae3ffdd967a8caeb4e3fb6d4003cd
dm vdo: add formatting logic and initialization

Add the core formatting logic. The initialization path is updated to
read the geometry block (block 0 on the storage device). If the block
is entirely zeroed, the device is treated as unformatted and
vdo_format() is called. Otherwise, the existing geometry is parsed
and the VDO is loaded as before.

The vdo_format() function initializes the volume geometry and super
block, and marks the VDO as needing it's layout saved to disk.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
Reviewed-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-vdo/status-codes.c
drivers/md/dm-vdo/vdo.c