Skip to content

Conversation

ermezavx
Copy link

@ermezavx ermezavx commented Sep 2, 2025

This pull request enhances label sanitization for device-mapper names and mount points. Spaces and parentheses in filesystem labels are now replaced with underscores, preventing duplicate mountpoints and ensuring correct mount state reporting.
Fixes #1415.

@vojtechtrefny
Copy link
Member

Jenkins, ok to test.

Copy link
Member

@vojtechtrefny vojtechtrefny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is fixing the linked issue. The label_to_safe_dm_name function affects only the device mapper name of the LUKS device, not the mount point (that's handled by sanitize_mount_point in udiskslinuxfilesystem.c). And I don't even think the parentheses in the mount point are the problem -- the problem is the detection of the mount point in this case udisks_linux_filesystem_update/udisks_mount_monitor_get_mounts_for_dev and most likely for Btrfs only (I cannot reproduce the issue with ext4, only with btrfs).

Edit: Ok, the problem is related to the device mapper name which than cannot be linked to the device, but that's still problem in the filesystem/mountpoint management code, sanitizing the dm name might fix it for this specific use case, but we should fix the core issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LUKS device with parentheses in label causes udisks2 to misreport mounted state and create duplicate mountpoints
2 participants