storagetm: Track backing device recursively

device_track_back() only checks a single DM layer when resolving the
originating device. Use
block_device_get_originating(..., /* recursive= */ true) to follow
stacked layers.
This commit is contained in:
Chris Down
2026-01-23 21:26:34 +08:00
parent 7b8c4d01e6
commit 53c7b19572
+1 -1
View File
@@ -848,7 +848,7 @@ static void device_track_back(sd_device *d, sd_device **ret) {
(void) sd_device_get_devname(d, &devname);
_cleanup_(sd_device_unrefp) sd_device *d_originating = NULL;
r = block_device_get_originating(d, &d_originating, /* recursive= */ false);
r = block_device_get_originating(d, &d_originating, /* recursive= */ true);
if (r < 0 && r != -ENOENT)
log_device_debug_errno(d, r, "Failed to get originating device for '%s', ignoring: %m", strna(devname));