[dm-devel] [PATCH 3/3] block: implement (some of) fallocate for block devices
Hannes Reinecke
hare at suse.de
Thu Sep 29 05:57:13 UTC 2016
On 09/29/2016 02:39 AM, Darrick J. Wong wrote:
> After much discussion, it seems that the fallocate feature flag
> FALLOC_FL_ZERO_RANGE maps nicely to SCSI WRITE SAME; and the feature
> FALLOC_FL_PUNCH_HOLE maps nicely to the devices that have been
> whitelisted for zeroing SCSI UNMAP. Punch still requires that
> FALLOC_FL_KEEP_SIZE is set. A length that goes past the end of the
> device will be clamped to the device size if KEEP_SIZE is set; or will
> return -EINVAL if not. Both start and length must be aligned to the
> device's logical block size.
>
> Since the semantics of fallocate are fairly well established already,
> wire up the two pieces. The other fallocate variants (collapse range,
> insert range, and allocate blocks) are not supported.
>
> Signed-off-by: Darrick J. Wong <darrick.wong at oracle.com>
> ---
> v2: Incorporate feedback from Christoph & Linus. Tentatively add
> a requirement that the fallocate arguments be aligned to logical block
> size, and put in a few XXX comments ahead of LSF discussion.
> v3: Forward port to 4.7.
> v4: Forward port to 4.8.
> ---
> fs/block_dev.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> fs/open.c | 3 +-
> 2 files changed, 80 insertions(+), 1 deletion(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare at suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
More information about the dm-devel
mailing list