Skip to content

Commit 6c8ebab

Browse files
committed
handle integrity devices for slave info lookup
Signed-off-by: Zen <[email protected]>
1 parent a2513ed commit 6c8ebab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ugrd/crypto/cryptsetup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = "desultory"
2-
__version__ = "4.1.3"
2+
__version__ = "4.2.0"
33

44
from json import loads
55
from pathlib import Path
@@ -147,6 +147,9 @@ def _get_dm_info(self, mapped_name: str) -> dict:
147147
def _get_dm_slave_info(self, device_info: dict) -> (str, dict):
148148
"""Gets the device mapper slave information for a particular device."""
149149
slave_source = device_info["slaves"][0]
150+
# For integrity backed devices, get the slave's slave
151+
if self["_vblk_info"].get(slave_source, {}).get("uuid", "").startswith("CRYPT-SUBDEV"):
152+
slave_source = self["_vblk_info"][slave_source]["slaves"][0]
150153
slave_name = self["_vblk_info"].get(slave_source, {}).get("name")
151154
search_paths = ["/dev/", "/dev/mapper/"]
152155

0 commit comments

Comments
 (0)