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:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user