lkml.org 
[lkml]   [2016]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] block: create ioctl to discard-or-zeroout a range of blocks
On Thu, Mar 03, 2016 at 01:01:11PM -0500, Martin K. Petersen wrote:
> That's not entirely true. Writing the blocks may cause them to be
> allocated on the storage device (depending on which flags we feed it in
> WRITE SAME).
>
> The filesystems people were wanted the following semantics:
>
> - deallocate, don't care about contents for future reads (discard)
> - deallocate, guarantee zeroes on future reads (zeroout)
> - (re)allocate, guarantee zeroes on future reads (zeroout)
>
> Maybe we just need a better naming scheme...

In filesystem terms we have two and three:

- FALLOC_FL_PUNCH_HOLE assures zeroes are returned, but space is
deallocated as much as possible
- FALLOC_FL_ZERO_RANGE assures zeroes are returned, AND blocks are
actually allocated

Returning stale blocks in a file system is a nasty security risk, so
we don't do that, and so shouldn't storage that offers any kind
of multi tenancy, and if it's just VMs using multiple partitions on it.

\
 
 \ /
  Last update: 2016-03-03 20:01    [W:0.124 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site