Thread (15 messages) flat view 15 messages, 5 authors, 2016-03-03

Re: [PATCH 2/2] block: create ioctl to discard-or-zeroout a range of blocks

From: Christoph Hellwig <hidden>
Date: 2016-03-03 18:00:07
Also in: linux-fsdevel, lkml

On Thu, Mar 03, 2016 at 09:55:38AM -0800, Linus Torvalds wrote:
Ugh.

But that essentially says that we shouldn't expose this interface at
all (unless we trust our white-lists - I'm sure they are getting
better, but if nobody has ever really _relied_ on the zeroing behavior
of trim, then I guess there could be tons of bugs lurking).
Fortunately what Ted said is close to the truth, but a little off.

The mess about ATA is all real, and we work around it by never claiming
discard zeroes data for any ATA device except those specificly
whitelisted because the vendors gave guarantees for it (see the
ATA_HORKAGE_ZERO_AFTER_TRIM flag and the commit introducing it).

The reason why we don't use it unconditionally is simply because
there are users that want blocks zeroed without deallocating the
physical blocks.  Now if you want to opt into the trim/unmap
behavior is one question, but we clearly need the split.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help