GNU bug report logs - #73654
[PATCH] gnu: luks-device-mapping-with-options: Add allow-discards? argument.

Previous Next

Package: guix-patches;

Reported by: Sisiutl <sisiutl <at> egregore.fun>

Date: Sun, 6 Oct 2024 09:45:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #40 received at 73654 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Tomas Volf <~@wolfsden.cz>
Cc: 73654 <at> debbugs.gnu.org, sisiutl <at> egregore.fun, ludo <at> gnu.org,
 hako <at> ultrarare.space, soeren <at> soeren-tempel.net
Subject: Re: [bug#73654] [PATCH v4] mapped-devices: luks: Support passing
 --allow-discards during open
Date: Sat, 22 Mar 2025 22:36:27 +0900
Hi,

Tomas Volf <~@wolfsden.cz> writes:

[...]

>> +               ;; We want to fallback to the password unlock if the keyfile fails.
>> +               (or (and keyfile
>> +                        (zero?
>> +                          (apply system*/tty
>> +                                 #$(file-append cryptsetup-static "/sbin/cryptsetup")
>> +                                 "--key-file" keyfile
>> +                                 cryptsetup-flags)))
>
> I am not sure about passing the --key-file before the `open' command.
> It does seem to work (currently), but I am not sure we should assume it
> always will.

It's documented as such, per 'cryptsetup --help':

--8<---------------cut here---------------start------------->8---
cryptsetup 2.6.1 flags: UDEV BLKID KEYRING KERNEL_CAPI 
Usage: cryptsetup [OPTION...] <action> <action-specific>

Help options:
  -?, --help                            Show this help message
      --usage                           Display brief usage
  -V, --version                         Print package version
      --active-name=STRING              Override device autodetection of dm device to be reencrypted
      --align-payload=SECTORS           Align payload at <n> sector boundaries - for luksFormat
      --allow-discards                  Allow discards (aka TRIM) requests for device
--8<---------------cut here---------------end--------------->8---

There are many options though perhaps we should just provide a
#:extra-args escape hatch.


-- 
Thanks,
Maxim




This bug report was last modified 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.