From: Milan Broz Subject: Re: [opensuse-factory] /sbin/fstrim: /home: FITRIM ioctl failed: Operation not supported Date: Wed, 23 Feb 2011 23:20:57 +0100 Message-ID: <4D658849.2010104@redhat.com> References: <4D644245.9000809@opensuse.org> <4D655C06.2080704@opensuse.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?Q3Jpc3RpYW4gUm9kcsOtZ3Vleg==?= , Greg Freemyer , opensuse-factory , ext4 , linux-fsdevel@vger.kernel.org To: Lukas Czerner Return-path: In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org On 02/23/2011 09:18 PM, Lukas Czerner wrote: >>> Now, there might be some way around this to allow trimming encrypted >>> volumes without serious security issue, but this is rather question for >>> dm-crypt guys. >> >> Maybe making work the "discard" mount option ? There were discussion about TRIM on dm-crypt mailing list several times. one of it is here http://thread.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/4075/ ) Currently TRIM/discard is not intentionally supported on dm-crypt. Security aspects are obvious (leaking of used blocks at least). The decision cannot be done in kernel automatically, you can have different policies, in some situation TRIM of encryption device is not problem, in other it can be disaster. So plan is to implement TRIM in dm-crypt but never enable it by default. You will be able to enable it per-device using device-mapper message with explicit user request. (we are using the same message mechanism for wiping/resuming key when freezing device). In future this can be flag for LUKS2 metadata but current version of LUKS doesn't allow such extensions. Milan