From: Dave Chinner <david@fromorbit.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH] mkfs: add discard support
Date: Fri, 9 Oct 2009 13:30:22 +1100 [thread overview]
Message-ID: <20091009023022.GL9464@discord.disaster> (raw)
In-Reply-To: <87iqerymu0.fsf@basil.nowhere.org>
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
between written, encrypted regions and unused space). Using
discards during mkfs and during filesystem operation opens up this
avenue of attack, hence my reasoning for making discards
optional....
> So I think Christoph's case of making it default is fine.
So do I, but for different reasons ;)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2009-10-09 2:29 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 [this message]
2009-10-10 4:22 ` Andi Kleen
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=20091009023022.GL9464@discord.disaster \
--to=david@fromorbit.com \
--cc=andi@firstfloor.org \
--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