The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Zhang Boyang <zhangboyang.id@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
	linux-block@vger.kernel.org
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Jan Kara <jack@suse.cz>, Ming Lei <ming.lei@redhat.com>,
	"Darrick J . Wong" <djwong@kernel.org>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 0/1] loop: introduce LO_FLAGS_NODEALLOC
Date: Sat,  6 Aug 2022 19:49:42 +0800	[thread overview]
Message-ID: <20220806114943.8754-1-zhangboyang.id@gmail.com> (raw)

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 



             reply	other threads:[~2022-08-06 11:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-06 11:49 Zhang Boyang [this message]
2022-08-06 11:49 ` [PATCH RESEND 1/1] loop: introduce LO_FLAGS_NODEALLOC Zhang Boyang
2022-08-06 14:51   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220806114943.8754-1-zhangboyang.id@gmail.com \
    --to=zhangboyang.id@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=kch@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox