On Wed, Sep 14 2016 at 11:41am -0400, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > On Wed, Sep 14, 2016 at 12:06 AM, Milan Broz <gmazyland@xxxxxxxxx> wrote: > > > > then you are saying that the default should be "destroy all the data > > on possible hidden disk" :-) > > No. > > > Because that should happen, if you will map "outer" volume with discards on, > > and there is a hidden disk (for outer volume it is "unused" space"). > > But that's independent of the crypto setup, isn't it? > > If the inner filesystem is some hidden crypto volume, then the outer > filesystem could be anything. And if you write to the outer filesystem > in some of the random hidden setups, you'll destroy the hidden volume > anyway. No? So you'd never write to it in the first place, much less > do "fstrim" on it. > > I thought the people who used hidden ("deniable") things didn't > actually ever *use* the outer filesystem at all, exactly so that they > can just put the real encrypted thing in there and nor worry about it. > > Am I missing something? What's the actual real setup?Can you explain - > in particular, can we perhaps notice it somehow, so that the normal > case at least can enable discard. > > Because the reason I want to do this, of course, is that I think it > was now my fifth or sixth setup where I had to manually enable this > thing, and I have never *ever* actually wanted to disable it. And I > bet that is true for 99.99% of all users (ie the normal case). I spoke with Ondrej (cc'd), who works closely with Milan on cryptsetup (they are designing v2 of that interface), and the hidden volumes thing boils down to "TrueCrypt" devices. Which has its own userspace to setup the device. But cryptsetup can activate (or even create) TrueCrypt devices too. So the current thinking is: this is a userspace defaults problem. The kernel dm-crypt discard default should stay disabled as is (otherwise TrueCrypt devices can get corrupted on discard -- will defer to Milan and/or others to further explain how if needed). But that the cryptsetup userspace default for luks devices (your 99.9%) can be changed to default to enabling discards. cryptsetup's default for TrueCrypt devices would still be to disable discards. Ondrej said he'd need a day to work through it further with Milan. Mike -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel