Skip to content

Commit 1070c8e

Browse files
committed
mount: Introduce options for NVMe devices
Signed-off-by: Vasiliy Stelmachenok <[email protected]>
1 parent 8abcb34 commit 1070c8e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/modules/mount/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ def get_mount_options(filesystem, mount_options, partition, efi_location = None)
113113

114114
# Append the appropriate options for ssd or hdd if set
115115
if is_ssd_disk(partition):
116-
option_items.extend(options.get("ssdOptions", []))
116+
name = os.path.basename(partition["device"])
117+
if name.startswith("/dev/nvme"):
118+
option_items.extend(options.get("nvmeOptions", []))
119+
else:
120+
option_items.extend(options.get("ssdOptions", []))
117121
else:
118122
option_items.extend(options.get("hddOptions", []))
119123

src/modules/mount/mount.schema.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ properties:
3636
properties:
3737
filesystem: { type: string }
3838
options: { type: array }
39+
nvmeOptions: { type: array }
3940
ssdOptions: { type: array }
4041
hddOptions: { type: array }
4142
required: [ filesystem ]

0 commit comments

Comments
 (0)