All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 0/3] fallocate for block devices
@ 2016-08-26  0:02 ` Darrick J. Wong
  0 siblings, 0 replies; 32+ messages in thread
From: Darrick J. Wong @ 2016-08-26  0:02 UTC (permalink / raw)
  To: axboe, darrick.wong
  Cc: linux-block, tytso, martin.petersen, snitzer, linux-api, bfoster,
	xfs, hch, dm-devel, linux-fsdevel, bart.vanassche

Hi,

This is a redesign of the patch series that fixes various interface
problems with the existing "zero out this part of a block device"
code.  BLKZEROOUT2 is gone.

The first patch is still a fix to the existing BLKZEROOUT ioctl to
invalidate the page cache if the zeroing command to the underlying
device succeeds.  Without this patch we still have the pagecache
coherence bug that's been in the kernel forever.

The second patch changes the internal block device functions to reject
attempts to discard or zeroout that are not aligned to the logical
block size.  Previously, we only checked that the start/len parameters
were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs
to 4k-LBA devices.

The third patch creates an fallocate handler for block devices, wires
up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects
FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent
fallocate interface between files and block devices.  It also allows
the combination of PUNCH_HOLE and NO_HIDE_STALE to invoke non-zeroing
discard.

Test cases for the new block device fallocate are now in xfstests as
generic/349-351.

Comments and questions are, as always, welcome.  Patches are against
4.8-rc3.

v7: Strengthen parameter checking and fix various code issues pointed
out by Linus and Christoph.
v8: More code rearranging, rebase to 4.6-rc3, and dig into alignment
issues.
v9: Forward port to 4.7.
v10: Forward port to 4.8.  Remove the extra call to
invalidate_inode_pages2_range per Bart Van Assche's request.

--D

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCH v11 0/3] fallocate for block devices
@ 2016-09-29 21:16 Darrick J. Wong
  2016-09-29 21:16   ` Darrick J. Wong
  0 siblings, 1 reply; 32+ messages in thread
From: Darrick J. Wong @ 2016-09-29 21:16 UTC (permalink / raw)
  To: axboe, akpm, darrick.wong
  Cc: linux-block, tytso, martin.petersen, snitzer, linux-api, bfoster,
	xfs, hch, dm-devel, hare, linux-fsdevel, bart.vanassche

Hi Andrew & others,

This is a resend of the patchset to fix page cache coherency with
BLKZEROOUT and implement fallocate for block devices.  This time I'm
sending it direct to Andrew for inclusion because the block layer
maintainer has not been responsive over the past year of submissions.
Can this please go upstream for 4.9?

The first patch is still a fix to the existing BLKZEROOUT ioctl to
invalidate the page cache if the zeroing command to the underlying
device succeeds.  Without this patch we still have the pagecache
coherence bug that's been in the kernel forever.

The second patch changes the internal block device functions to reject
attempts to discard or zeroout that are not aligned to the logical
block size.  Previously, we only checked that the start/len parameters
were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs
to 4k-LBA devices.

The third patch creates an fallocate handler for block devices, wires
up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects
FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent
fallocate interface between files and block devices.  It also allows
the combination of PUNCH_HOLE and NO_HIDE_STALE to invoke non-zeroing
discard.

Test cases for the new block device fallocate are now in xfstests as
generic/349-351.

Comments and questions are, as always, welcome.  Patches are against
4.8-rc8.

v7: Strengthen parameter checking and fix various code issues pointed
out by Linus and Christoph.
v8: More code rearranging, rebase to 4.6-rc3, and dig into alignment
issues.
v9: Forward port to 4.7.
v10: Forward port to 4.8.  Remove the extra call to
invalidate_inode_pages2_range per Bart Van Assche's request.
v11: Minor fallocate code cleanups suggested by Bart Van Assche.

--D

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCH v10 0/3] fallocate for block devices
@ 2016-09-29  0:39 Darrick J. Wong
  2016-09-29  0:39   ` Darrick J. Wong
  0 siblings, 1 reply; 32+ messages in thread
From: Darrick J. Wong @ 2016-09-29  0:39 UTC (permalink / raw)
  To: axboe, akpm, darrick.wong
  Cc: linux-block, tytso, martin.petersen, snitzer, linux-api, bfoster,
	xfs, hch, dm-devel, linux-fsdevel, bart.vanassche

Hi Andrew & others,

This is a resend of the patchset to fix page cache coherency with
BLKZEROOUT and implement fallocate for block devices.  This time I'm
sending it direct to Andrew for inclusion because the block layer
maintainer has not been responsive over the past year of submissions.
Can this please go upstream for 4.9?

The first patch is still a fix to the existing BLKZEROOUT ioctl to
invalidate the page cache if the zeroing command to the underlying
device succeeds.  Without this patch we still have the pagecache
coherence bug that's been in the kernel forever.

The second patch changes the internal block device functions to reject
attempts to discard or zeroout that are not aligned to the logical
block size.  Previously, we only checked that the start/len parameters
were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs
to 4k-LBA devices.

The third patch creates an fallocate handler for block devices, wires
up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects
FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent
fallocate interface between files and block devices.  It also allows
the combination of PUNCH_HOLE and NO_HIDE_STALE to invoke non-zeroing
discard.

Test cases for the new block device fallocate are now in xfstests as
generic/349-351.

Comments and questions are, as always, welcome.  Patches are against
4.8-rc8.

v7: Strengthen parameter checking and fix various code issues pointed
out by Linus and Christoph.
v8: More code rearranging, rebase to 4.6-rc3, and dig into alignment
issues.
v9: Forward port to 4.7.
v10: Forward port to 4.8.  Remove the extra call to
invalidate_inode_pages2_range per Bart Van Assche's request.

--D

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCH v9 0/3] fallocate for block devices
@ 2016-06-17  1:17 Darrick J. Wong
  2016-06-17  1:17   ` Darrick J. Wong
  0 siblings, 1 reply; 32+ messages in thread
From: Darrick J. Wong @ 2016-06-17  1:17 UTC (permalink / raw)
  To: axboe, darrick.wong
  Cc: linux-block, tytso, martin.petersen, snitzer, linux-api, bfoster,
	xfs, hch, dm-devel, linux-fsdevel

Hi,

This is a redesign of the patch series that fixes various interface
problems with the existing "zero out this part of a block device"
code.  BLKZEROOUT2 is gone.

The first patch is still a fix to the existing BLKZEROOUT ioctl to
invalidate the page cache if the zeroing command to the underlying
device succeeds.  Without this patch we still have the pagecache
coherence bug that's been in the kernel forever.

The second patch changes the internal block device functions to reject
attempts to discard or zeroout that are not aligned to the logical
block size.  Previously, we only checked that the start/len parameters
were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs
to 4k-LBA devices.

The third patch creates an fallocate handler for block devices, wires
up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects
FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent
fallocate interface between files and block devices.  It also allows
the combination of PUNCH_HOLE and NO_HIDE_STALE to invoke non-zeroing
discard.

Test cases for the new block device fallocate are now in xfstests as
generic/349-351.

Comments and questions are, as always, welcome.  Patches are against
4.7-rc3.

v7: Strengthen parameter checking and fix various code issues pointed
out by Linus and Christoph.
v8: More code rearranging, rebase to 4.6-rc3, and dig into alignment
issues.
v9: Forward port to 4.7.

--D

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [RFC DONOTMERGE v8 0/3] fallocate for block devices
@ 2016-04-13  4:01 Darrick J. Wong
  2016-04-13  4:01   ` Darrick J. Wong
  0 siblings, 1 reply; 32+ messages in thread
From: Darrick J. Wong @ 2016-04-13  4:01 UTC (permalink / raw)
  To: darrick.wong
  Cc: axboe, hch, tytso, martin.petersen, snitzer, linux-api, bfoster,
	xfs, linux-block, dm-devel, linux-fsdevel

Hi,

This is a redesign of the patch series that fixes various interface
problems with the existing "zero out this part of a block device"
code.  BLKZEROOUT2 is gone.

The first patch is still a fix to the existing BLKZEROOUT ioctl to
invalidate the page cache if the zeroing command to the underlying
device succeeds.

The second patch changes the internal block device functions to reject
attempts to discard or zeroout that are not aligned to the logical
block size.  Previously, we only checked that the start/len parameters
were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs
to 4k-LBA devices.

The third patch creates an fallocate handler for block devices, wires
up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects
FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent
fallocate interface between files and block devices.  It also allows
the combination of PUNCH_HOLE and NO_HIDE_STALE to invoke non-zeroing
discard.

The point of this patchset is not to go upstream, but is to be a
starting point for a discussion at LSF.  Don't merge this!  Foremost
in my mind is whether or not we require the offset/len parameters to
be aligned to logical block size or minimum_io_size; what error code
to return for unaligned values; and whether or not we should allow
byte ranges and zero blocks with the page cache (like file fallocate
does now).  It'll also be a jumping off point for Brian Foster and
Mike Snitzer's patches to allow bdev clients to ask that space be
allocated to a range, and to plumb that out to userspace.

Test cases for the new block device fallocate have been submitted to
the xfstests list as generic/70[5-7], though the latest versions of
those test cases will be attached to this patchset for convenience.

Comments and questions are, as always, welcome.  Patches are against
4.6-rc3.

v7: Strengthen parameter checking and fix various code issues pointed
out by Linus and Christoph.
v8: More code rearranging, rebase to 4.6-rc3, and dig into alignment
issues.

--D

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCH v7 0/3] fallocate for block devices to provide zero-out
@ 2016-03-15 19:42 Darrick J. Wong
  2016-03-15 19:42 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
  0 siblings, 1 reply; 32+ messages in thread
From: Darrick J. Wong @ 2016-03-15 19:42 UTC (permalink / raw)
  To: axboe, torvalds, darrick.wong
  Cc: bfields, tytso, martin.petersen, linux-api, david, linux-kernel,
	shane.seymour, hch, linux-fsdevel, jlayton, akpm

Hi,

This is a redesign of the patch series that fixes various interface
problems with the existing "zero out this part of a block device"
code.  BLKZEROOUT2 is gone.

The first patch is still a fix to the existing BLKZEROOUT ioctl to
invalidate the page cache if the zeroing command to the underlying
device succeeds.

The second patch changes the internal block device functions to reject
attempts to discard or zeroout that are not aligned to the logical
block size.  Previously, we only checked that the start/len parameters
were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs
to 4k-LBA devices.

The third patch creates an fallocate handler for block devices, wires
up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects
FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent
fallocate interface between files and block devices.

Test cases for the new block device fallocate have been submitted to
the xfstests list as generic/70[5-7], though the numbering will change
to a lower number when the API and the tests are accepted upstream.
Look for the v2 testcase patch, which reflects v7 of this patchset.

Comments and questions are, as always, welcome.  Patches are against
4.5.

v7: Strengthen parameter checking and fix various code issues pointed
out by Linus and Christoph.

--D

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCH v6 0/3] fallocate for block devices to provide zero-out
@ 2016-03-05  0:55 Darrick J. Wong
  2016-03-05  0:56 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
  0 siblings, 1 reply; 32+ messages in thread
From: Darrick J. Wong @ 2016-03-05  0:55 UTC (permalink / raw)
  To: axboe, torvalds, darrick.wong
  Cc: hch, tytso, martin.petersen, linux-api, david, linux-kernel,
	shane.seymour, bfields, linux-fsdevel, jlayton, akpm

Hi,

This is a redesign of the patch series that fixes various interface
problems with the existing "zero out this part of a block device"
code.  BLKZEROOUT2 is gone.

The first patch is still a fix to the existing BLKZEROOUT ioctl to
invalidate the page cache if the zeroing command to the underlying
device succeeds.

The second patch changes the internal block device functions to reject
attempts to discard or zeroout that are not aligned to the logical
block size.  Previously, we only checked that the start/len parameters
were 512-byte aligned, which caused kernel BUG_ONs for unaligned IOs
to 4k-LBA devices.

The third patch creates an fallocate handler for block devices, wires
up the FALLOC_FL_PUNCH_HOLE flag to zeroing-discard, and connects
FALLOC_FL_ZERO_RANGE to write-same so that we can have a consistent
fallocate interface between files and block devices.

Test cases[1] for the new block device fallocate will have been
submitted to the xfstests list as generic/70[5-7], though the
numbering will change to a lower number when the API and the tests are
accepted upstream.

Comments and questions are, as always, welcome.  Patches are against
4.5-rc6.

--D

[1] https://github.com/djwong/xfstests/commit/fdc0980ef01076dfb246fd1db2511227e9f67a3f

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

end of thread, other threads:[~2016-09-29 21:17 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26  0:02 [PATCH v10 0/3] fallocate for block devices Darrick J. Wong
2016-08-26  0:02 ` Darrick J. Wong
2016-08-26  0:02 ` [PATCH 1/3] block: invalidate the page cache when issuing BLKZEROOUT Darrick J. Wong
2016-08-26  0:02   ` Darrick J. Wong
2016-08-26  0:02 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
2016-08-26  0:02   ` Darrick J. Wong
2016-08-26  0:02 ` [PATCH 3/3] block: implement (some of) fallocate for block devices Darrick J. Wong
2016-08-26  0:02   ` Darrick J. Wong
2016-08-26  2:15 ` [PATCH v10 0/3] " Martin K. Petersen
2016-08-26  2:15   ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2016-09-29 21:16 [PATCH v11 " Darrick J. Wong
2016-09-29 21:16 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
2016-09-29 21:16   ` Darrick J. Wong
2016-09-29  0:39 [PATCH v10 0/3] fallocate for block devices Darrick J. Wong
2016-09-29  0:39 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
2016-09-29  0:39   ` Darrick J. Wong
2016-09-29  5:56   ` Hannes Reinecke
2016-09-29  5:56     ` Hannes Reinecke
2016-09-29  5:56     ` Hannes Reinecke
2016-06-17  1:17 [PATCH v9 0/3] fallocate for block devices Darrick J. Wong
2016-06-17  1:17 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
2016-06-17  1:17   ` Darrick J. Wong
2016-06-17  1:17   ` Darrick J. Wong
2016-06-20 12:37   ` Bart Van Assche
2016-06-20 12:37     ` Bart Van Assche
2016-06-29  4:58   ` Martin K. Petersen
2016-06-29  4:58     ` Martin K. Petersen
2016-04-13  4:01 [RFC DONOTMERGE v8 0/3] fallocate for block devices Darrick J. Wong
2016-04-13  4:01 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
2016-04-13  4:01   ` Darrick J. Wong
2016-04-13 14:23   ` Christoph Hellwig
2016-04-13 14:23     ` Christoph Hellwig
2016-03-15 19:42 [PATCH v7 0/3] fallocate for block devices to provide zero-out Darrick J. Wong
2016-03-15 19:42 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
2016-03-05  0:55 [PATCH v6 0/3] fallocate for block devices to provide zero-out Darrick J. Wong
2016-03-05  0:56 ` [PATCH 2/3] block: require write_same and discard requests align to logical block size Darrick J. Wong
2016-03-05  3:02   ` Linus Torvalds
2016-03-15  7:34   ` Christoph Hellwig

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.