public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Andi Kleen <andi@firstfloor.org>,
	xfs@oss.sgi.com
Subject: Re: [PATCH] mkfs: add discard support
Date: Sat, 10 Oct 2009 06:22:24 +0200	[thread overview]
Message-ID: <20091010042224.GG1656@one.firstfloor.org> (raw)
In-Reply-To: <20091009023022.GL9464@discord.disaster>

On Fri, Oct 09, 2009 at 01:30:22PM +1100, Dave Chinner wrote:
> On Wed, Oct 07, 2009 at 10:24:07PM +0200, Andi Kleen wrote:
> > Dave Chinner <david@fromorbit.com> writes:
> > > On Tue, Oct 06, 2009 at 02:47:58PM -0400, Christoph Hellwig wrote:
> > >> Call the BLKDISCARD ioctl to mark the whole disk as unused before creating
> > >> a new filesystem.  This will allow SSDs, Arrays with thin provisioning support
> > >> and virtual machines to make smarter allocation decisions.
> > >
> > > Good idea, but perhaps the discard should be optional rather than
> > > unconditional.  My immediate thought was the SOP for setting up
> > > encrypted devices - fill the empty disk with random data before
> > > setting up the encrypted device. If you then send it a discard....
> >
> > This actually doesn't really work for SSDs, because SSDs typically
> > have more internal capacity than they advertise and when you fill
> > it up then it will just allocate new blocks and leave some of the
> > blocks with the existing data around.
> 
> Agreed, but initialisation with random data before encryption is not
> to delete existing information on the drive - it is to prevent
> simple side-channel attacks that can significantly reduce the
> strength of the encryption (e.g. an observer can tell the difference

I see. That makes sense.

Although to be pedantic your description above is slightly
wrong then -- you need to fill it up after setting up the encryption,
not before. In this case it might be actually more reasonable
to simply fill the file system with a random file (although on XFS
might need to reset inode limits first to catch the metadata
reservations)

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-10-10  4:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-06 18:47 [PATCH] mkfs: add discard support Christoph Hellwig
2009-10-07  4:42 ` Dave Chinner
2009-10-07  6:05   ` Michael Monnerie
2009-10-07 14:11   ` Christoph Hellwig
2009-10-07 20:24   ` Andi Kleen
2009-10-09  2:30     ` Dave Chinner
2009-10-10  4:22       ` Andi Kleen [this message]
2009-10-10 16:24       ` Christoph Hellwig
2009-10-12  1:33         ` Andi Kleen
2009-10-07 22:26 ` [PATCH v2] " Christoph Hellwig
2009-10-10 20:55   ` Eric Sandeen
     [not found] <1235789111.21721254856913943.JavaMail.root@mail-au.aconex.com>
2009-10-06 19:24 ` [PATCH] " Nathan Scott
2009-10-06 19:26   ` Christoph Hellwig
2009-10-07  1:18   ` Christoph Hellwig
2009-10-07  1:20     ` Nathan Scott
2009-10-07  3:55       ` Eric Sandeen
2009-11-12 16:04       ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091010042224.GG1656@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox