]> git.ipfire.org Git - thirdparty/systemd.git/commit
blockdev-util: Iterate through all DM layers 40426/head
authorChris Down <chris@chrisdown.name>
Thu, 22 Jan 2026 10:15:33 +0000 (18:15 +0800)
committerChris Down <chris@chrisdown.name>
Fri, 23 Jan 2026 13:27:12 +0000 (21:27 +0800)
commitb38943b01bfe3aa375c91164d2709272b5a90119
treedc1457de1cb4e923a1fc198f77fbf524ac89534f
parent53c7b19572ec306cb40f0aa57f02b90b5b2c2c2a
blockdev-util: Iterate through all DM layers

get_block_device_harder_fd() currently only traverses one level of
device mapper stacking when looking for the underlying block device.
This causes issues with nested DM setups like dm-crypt on top of
dm-integrity, where we don't traverse enough to get the actual physical
device.

Fix this by iterating through all DM layers until we reach a device with
no underlying device.

Fixes: #40419
src/shared/blockdev-util.c