]> git.ipfire.org Git - thirdparty/systemd.git/commit
Fix bug in DM iteration and standardise how to iterate through DM layers (#40426)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 30 Jan 2026 06:36:03 +0000 (15:36 +0900)
committerGitHub <noreply@github.com>
Fri, 30 Jan 2026 06:36:03 +0000 (15:36 +0900)
commit1d60b723a30d00a2ccb21b12e84847f93ff9a933
tree91f7b049947d31f1a45284002ce2aa38fc2857d2
parent1ccf4fe026846e1c21d99a5b3327f78d7dc90b50
parentb38943b01bfe3aa375c91164d2709272b5a90119
Fix bug in DM iteration and standardise how to iterate through DM layers (#40426)

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. And while we're at it also make cgroups use the
same logic.

Fixes: #40419
src/repart/repart.c
src/storagetm/storagetm.c