Skip to content

loop: introduce LO_FLAGS_NODEALLOC

Zhang Boyang linux-block lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 3/31 patch 1 replyIn review
  2. v1 posting 2/31 patch 0 repliesSuperseded
  3. v1 posting 1/31 patch 0 repliesSuperseded

Patches in v1 posting 3/3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1loop: introduce LO_FLAGS_NODEALLOCdrivers/block/loop.c include/uapi/linux/loop.h+26 -61 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RESEND 0/1] loop: introduce LO_FLAGS_NODEALLOC

Hi,

This patch gives userspace ability to prevent underlying file of loop device to be sparse. Currently, if loop device is 'trimmed' (BLKDISCARD), then underlying file will always become sparse and disk space freed. This behaviour is good for thin provisioning but not good for preallocated disk images. This patch introduces LO_FLAGS_NODEALLOC flag, which will write zeroes to underlying file instead of punching holes when BLKDISCARD is requested. Thus reducing file fragmentation of preallocated disk images and improve performance.

I will also submit patches to util-linux to provide userspace support if this patch is merged.

Best Regards,
Zhang Boyang