lkml.org 
[lkml]   [2016]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 0/3] fallocate for block devices to provide zero-out
From
On Fri, Mar 4, 2016 at 4:55 PM, Darrick J. Wong <darrick.wong@oracle.com> wrote:
>
> This is a redesign of the patch series that fixes various interface
> problems with the existing "zero out this part of a block device"
> code. BLKZEROOUT2 is gone.

I replied to two of the patches with small nits, but on the whole I
like it. The only nit that I think is serious is that you shouldn't be
requiring people to have to use FALLOC_FL_KEEP_SIZE.

If anything, you might just change that logic to say: If
FALLOC_FL_KEEP_SIZE is set, then we truncate the hole punching/zeroing
to the size of the device. So people could do something like

fallocate(fd,
FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
0, ~0);

to trim the whole device (and if FALLOC_FL_KEEP_SIZE isn't set, then
the above would be an error simply because the requested hole was
bigger than the device)

Linus

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