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 5aade57c426af33152e8d0cf6c1f8e8296d486d6..15c86d389782d983b3ca63730789cc9e50430b8d 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 3a2cfe459b16a619dab36fcd8e6c2105c256dda2..ba0fdbc8e88303d650798f44bbb67722e130f75a 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;