From: Eric Sandeen Subject: Re: [PATCH] ext4: Add support for SFITRIM, an ioctl for secure FITRIM. Date: Fri, 13 Jun 2014 14:57:19 -0500 Message-ID: <539B579F.5000403@redhat.com> References: <1402625647-31439-1-git-send-email-jpa@google.com> <539A63C1.8010809@redhat.com> <20140613031538.GR4453@dastard> <20140613033029.GS4453@dastard> <20140613050703.GT4453@dastard> <20140613142054.GA23180@thunk.org> <20140613143157.GB23180@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Dave Chinner , linux-ext4@vger.kernel.org, Geremy Condra , "linux-fsdevel@vger.kernel.org" To: JP Abgrall , "Theodore Ts'o" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52404 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbaFMT5U (ORCPT ); Fri, 13 Jun 2014 15:57:20 -0400 In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org List-ID: On 6/13/14, 2:44 PM, JP Abgrall wrote: > On Fri, Jun 13, 2014 at 7:31 AM, Theodore Ts'o wrote: > >> If so, you might be better off either doing per-file encryption, or >> per-file secure discard. > > The per-file secure discard seems to be the way to go, as there are > only a few places in Android where this needs to be turned on. > The current idletime-fstrim would switch from FITRIM to SFITRIM to > reduce the leftovers. Apologies if this is a dumb thing to point out, but... mmc is the only in-kernel driver (aside from xen) which can even set the flags necessary to enable secure discard; and then only if mmc_can_secure_erase_trim() is true, so it depends on the card, I guess. I don't know what device you're running on, but figured it might be worth pointing out that not all hardware even supports this capability. -Eric