chiark / gitweb /
systemd-cryptsetup: makes “discard” a synonym for “allow-discards”
authorOndrej Balaz <blami@blami.net>
Fri, 9 Aug 2013 18:37:52 +0000 (20:37 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Aug 2013 02:54:07 +0000 (22:54 -0400)
systemd-cryptsetup recognizes option 'allow-discards' in /etc/crypttab
to enable TRIM passthrough to underlying encrypted device. In Debian
this option was changed to 'discard' to avoid hyphen in option name.
(see: #648868 and `man crypttab`).

[zj: update crypttab(5) too, making "discard" the default.]

man/crypttab.xml
src/cryptsetup/cryptsetup.c

index 5aade57..15c86d3 100644 (file)
                 <variablelist class='crypttab-options'>
 
                         <varlistentry>
-                                <term><varname>allow-discards</varname></term>
+                                <term><varname>discard</varname></term>
 
                                 <listitem><para>Allow discard requests to be
                                 passed through the encrypted block device. This
index 3a2cfe4..ba0fdbc 100644 (file)
@@ -129,7 +129,7 @@ static int parse_one_option(const char *option) {
                 opt_readonly = true;
         else if (streq(option, "verify"))
                 opt_verify = true;
-        else if (streq(option, "allow-discards"))
+        else if (streq(option, "allow-discards") || streq(option, "discard"))
                 opt_discards = true;
         else if (streq(option, "luks"))
                 opt_type = CRYPT_LUKS1;