public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/1] loop: introduce LO_FLAGS_NO_DEALLOC
@ 2022-08-06 15:30 Zhang Boyang
  2022-08-06 15:30 ` [PATCH V2 1/1] " Zhang Boyang
  2022-08-11 11:40 ` Userspace support for LO_FLAGS_NO_DEALLOC (Re: [PATCH V2 0/1] loop: introduce LO_FLAGS_NO_DEALLOC) Zhang Boyang
  0 siblings, 2 replies; 5+ messages in thread
From: Zhang Boyang @ 2022-08-06 15:30 UTC (permalink / raw)
  To: Jens Axboe, Christoph Hellwig, linux-block
  Cc: Tetsuo Handa, Jan Kara, Ming Lei, Darrick J . Wong,
	Chaitanya Kulkarni, Damien Le Moal, Martin K . Petersen,
	linux-kernel

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_NO_DEALLOC
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.

Changes in V1->V2:
Renamed NODEALLOC to NO_DEALLOC, to avoid confusion between NO_DEALLOC
and NODE_ALLOC. Suggested by Jens Axboe.

Best Regards,
Zhang Boyang 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-11 11:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-06 15:30 [PATCH V2 0/1] loop: introduce LO_FLAGS_NO_DEALLOC Zhang Boyang
2022-08-06 15:30 ` [PATCH V2 1/1] " Zhang Boyang
2022-08-09 22:19   ` Darrick J. Wong
2022-08-10 11:00     ` Zhang Boyang
2022-08-11 11:40 ` Userspace support for LO_FLAGS_NO_DEALLOC (Re: [PATCH V2 0/1] loop: introduce LO_FLAGS_NO_DEALLOC) Zhang Boyang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox