FS#41287 - [cryptsetup] systemd-cryptsetup-generator / libcryptsetup doesn't pass discard option
Attached to Project:
Arch Linux
Opened by Archer (justanarcher) - Monday, 21 July 2014, 17:22 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 30 July 2015, 14:09 GMT
Opened by Archer (justanarcher) - Monday, 21 July 2014, 17:22 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 30 July 2015, 14:09 GMT
|
Details
Description:
I use sd-encrypt hook provided by cryptsetup package to mount encrypted root. After upgrading to cryptsetup 1.6.5-1 and generating a new initramfs, 'rd.luks.options=discard' in cmdline no longer has any effect (cryptsetup status doesn't show 'flags: discards' and fstrim refuses to work). Downgrading to 1.6.4 an generating a new initramfs solves the issue. From the command line 'cryptsetup open --allow discards' works correctly with both versions. Additional info: From /etc/mkinitcpio.conf: HOOKS="systemd sd-encrypt autodetect keyboard block filesystems sd-shutdown" /proc/cmdline: initrd=\initramfs-linux.img rd.luks.uuid=[partition uuid] rd.luks.options=discard root=UUID=[root uuid] rootflags=[..discard..] rw I think allow-discards option got recently renamed to just discard but both have no effect with the new cryptsetup version and both work correctly the previous one. Steps to reproduce: Create full-disk encryption and boot like described above. |
This task depends upon
Closed by Dave Reisner (falconindy)
Thursday, 30 July 2015, 14:09 GMT
Reason for closing: Fixed
Additional comments about closing: systemd-223 (despite no changes occuring here between 222 and 223)
Thursday, 30 July 2015, 14:09 GMT
Reason for closing: Fixed
Additional comments about closing: systemd-223 (despite no changes occuring here between 222 and 223)
Where are you seeing this? In cryptsetup, 'allow-discards' is the only supported option. In systemd-crypsetup, 'allow-discards' was added after the fact as a synonym for Debian compat (but 'discard' is still valid).
In any event, I can't see how this is systemd related if the only package change was cryptsetup... And even then, it doesn't make sense to me.
We could change the hook to load dm-crypt unconditionally before any activation takes place. Other than that, we need to wait until libcryptsetup fixes this situation.