All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Christoph Hellwig <hch@infradead.org>,
	Avi Kivity <avi@scylladb.com>, Andres Freund <andres@anarazel.de>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
	linux-ext4@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten extents?
Date: Tue, 12 Jan 2021 18:43:39 +0000	[thread overview]
Message-ID: <20210112184339.GA1238746@infradead.org> (raw)
In-Reply-To: <C8811877-48A9-4199-9F28-20F5B071AE36@dilger.ca>

On Tue, Jan 12, 2021 at 11:39:58AM -0700, Andreas Dilger wrote:
> > XFS already has a XFS_IOC_ALLOCSP64 that is defined to actually
> > allocate written extents.  It does not currently use
> > blkdev_issue_zeroout, but could be changed pretty trivially to do so.
> > 
> >> But note it will need to be plumbed down to md and dm to be generally
> >> useful.
> > 
> > DM and MD already support mddev_check_write_zeroes, at least for the
> > usual targets.
> 
> Similarly, ext4 also has EXT4_GET_BLOCKS_CREATE_ZERO that can allocate zero
> filled extents rather than unwritten extents (without clobbering existing
> data like FALLOC_FL_ZERO_RANGE does), and just needs a flag from fallocate()
> to trigger it.  This is plumbed down to blkdev_issue_zeroout() as well.

XFS_IOC_ALLOCSP64 actually is an ioctl that has been around since 1995
on IRIX (as an fcntl).

  reply	other threads:[~2021-01-12 18:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30  6:28 fallocate(FALLOC_FL_ZERO_RANGE_BUT_REALLY) to avoid unwritten extents? Andres Freund
2021-01-04 18:19 ` Darrick J. Wong
2021-01-04 19:10   ` Andres Freund
2021-01-04 19:57     ` Avi Kivity
2021-01-12 18:16       ` Christoph Hellwig
2021-01-12 18:39         ` Andreas Dilger
2021-01-12 18:43           ` Christoph Hellwig [this message]
2021-01-12 18:51             ` Andreas Dilger
2021-01-12 21:14               ` Darrick J. Wong
2021-01-12 21:36                 ` Andres Freund
2021-01-13  7:44                   ` Avi Kivity
2021-01-19  3:44                     ` Andreas Dilger
2021-01-04 19:17 ` Theodore Ts'o
2021-01-04 19:24   ` Matthew Wilcox
2021-01-04 20:29   ` Andres Freund
2021-01-04 22:40   ` Eric Sandeen
2021-01-06 22:52 ` Dave Chinner
2021-01-06 23:40   ` Andres Freund
2021-01-08 20:32     ` Dave Chinner

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=20210112184339.GA1238746@infradead.org \
    --to=hch@infradead.org \
    --cc=adilger@dilger.ca \
    --cc=andres@anarazel.de \
    --cc=avi@scylladb.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.