All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 00/17] Improvements around discard and write zeroes
@ 2012-03-08 17:15 Paolo Bonzini
  2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 01/17] qemu-iotests: add a simple test for write_zeroes Paolo Bonzini
                   ` (16 more replies)
  0 siblings, 17 replies; 68+ messages in thread
From: Paolo Bonzini @ 2012-03-08 17:15 UTC (permalink / raw)
  To: qemu-devel

This series reworks write_zeroes and discard support in QEMU, with
the aim of enabling discard support in guests.  The problem here is
that so far the semantics of discard were left to the block drivers.
Discard could only be enabled as long as all storage had the same
characteristics, including all of them supporting it and all of them
having the same discard granularity.  Hence, nobody really bothered to
enable it.  (This is good, because we have fewer backwards-compatibility
issues).

This series fixes this by specifying the semantics of discard at the block
layer level: from now on, discard will always have sector granularity
and write zeroes to the devices.  Given this choice, the equivalent
of Linux discard_zeroes_data can also be easily implemented.

Patches 1-4 add information on discard to bdrv_get_info, and implement
discard for QED.

Patches 5-8 replace the write_zeroes operation with discard.

Patches 9-12 turn discard on in the device models.

Patches 13-15 add discard support for files and enable hole-punching
in other filesystems than XFS.

To complete thin provisioning support, patches 16 and 17 implement
is_allocated for raw using the brand new SEEK_HOLE/SEEK_DATA
interface.  With these patches and with the kernel patch at
http://patchwork.xfs.org/patch/3264/ it should be possible to do efficient
streaming with raw on XFS.

Various bits could be separated and committed in parts; comments
are welcome.

Paolo Bonzini (17):
  qemu-iotests: add a simple test for write_zeroes
  qed: make write-zeroes bounce buffer smaller than a single cluster
  block: add discard properties to BlockDriverInfo
  qed: implement bdrv_aio_discard
  block: pass around qiov for write_zeroes operation
  block: use bdrv_{co,aio}_discard for write_zeroes operations
  block: make high level discard operation always zero
  block: kill the write zeroes operation
  ide: issue discard asynchronously but serialize the pieces
  ide/scsi: add discard_zeroes_data property
  ide/scsi: prepare for flipping the discard defaults
  ide/scsi: turn on discard
  block: fallback from discard to writes
  block: support FALLOC_FL_PUNCH_HOLE trimming
  raw: add get_info
  qemu-io: fix the alloc command
  raw: implement is_allocated

 block.c                    |   62 +++++++------
 block.h                    |   30 ++++---
 block/qcow2.c              |    2 +
 block/qed.c                |  126 ++++++++++++-------------
 block/raw-posix.c          |  100 +++++++++++++++++++-
 block/raw.c                |   14 +++
 block_int.h                |    8 --
 hw/ide/core.c              |   81 +++++++++++-----
 hw/ide/qdev.c              |    6 +-
 hw/pc_piix.c               |  224 ++++++++++++++++++++++++++++++++++++++++++++
 hw/scsi-disk.c             |   17 +++-
 qemu-io.c                  |   61 ++----------
 tests/qemu-iotests/031     |   73 ++++++++++++++
 tests/qemu-iotests/031.out |   29 ++++++
 tests/qemu-iotests/group   |    1 +
 15 files changed, 635 insertions(+), 199 deletions(-)
 create mode 100755 tests/qemu-iotests/031
 create mode 100644 tests/qemu-iotests/031.out

-- 
1.7.7.6

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

end of thread, other threads:[~2012-03-27 10:17 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08 17:15 [Qemu-devel] [RFC PATCH 00/17] Improvements around discard and write zeroes Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 01/17] qemu-iotests: add a simple test for write_zeroes Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 02/17] qed: make write-zeroes bounce buffer smaller than a single cluster Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 03/17] block: add discard properties to BlockDriverInfo Paolo Bonzini
2012-03-09 16:47   ` Kevin Wolf
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 04/17] qed: implement bdrv_aio_discard Paolo Bonzini
2012-03-09 16:31   ` Kevin Wolf
2012-03-09 17:53     ` Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 05/17] block: pass around qiov for write_zeroes operation Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations Paolo Bonzini
2012-03-09 16:37   ` Kevin Wolf
2012-03-09 18:06     ` Paolo Bonzini
2012-03-10 18:02       ` Richard Laager
2012-03-12 12:27         ` Paolo Bonzini
2012-03-12 13:04           ` Kevin Wolf
2012-03-13 19:13           ` Richard Laager
2012-03-14  7:41             ` Paolo Bonzini
2012-03-14 12:01               ` Kevin Wolf
2012-03-14 12:14                 ` Paolo Bonzini
2012-03-14 12:37                   ` Kevin Wolf
2012-03-14 12:49                     ` Paolo Bonzini
2012-03-14 13:04                       ` Kevin Wolf
2012-03-24 15:33                       ` Christoph Hellwig
2012-03-24 15:30                   ` Christoph Hellwig
2012-03-26 19:40                     ` Richard Laager
2012-03-27 10:20                       ` Kevin Wolf
2012-03-24 15:29                 ` Christoph Hellwig
2012-03-26  9:44                   ` Daniel P. Berrange
2012-03-26  9:56                     ` Christoph Hellwig
2012-03-15  0:42               ` Richard Laager
2012-03-15  9:36                 ` Paolo Bonzini
2012-03-16  0:47                   ` Richard Laager
2012-03-16  9:34                     ` Paolo Bonzini
2012-03-24 15:27         ` Christoph Hellwig
2012-03-26 19:40           ` Richard Laager
2012-03-27  9:08             ` Christoph Hellwig
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 07/17] block: make high level discard operation always zero Paolo Bonzini
2012-03-08 17:55   ` Avi Kivity
2012-03-09 16:42     ` Kevin Wolf
2012-03-12 10:42       ` Avi Kivity
2012-03-12 11:04         ` Kevin Wolf
2012-03-12 12:03           ` Avi Kivity
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 08/17] block: kill the write zeroes operation Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 09/17] ide: issue discard asynchronously but serialize the pieces Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 10/17] ide/scsi: add discard_zeroes_data property Paolo Bonzini
2012-03-08 18:13   ` Avi Kivity
2012-03-08 18:14     ` Avi Kivity
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 11/17] ide/scsi: prepare for flipping the discard defaults Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 12/17] ide/scsi: turn on discard Paolo Bonzini
2012-03-08 18:17   ` Avi Kivity
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 13/17] block: fallback from discard to writes Paolo Bonzini
2012-03-24 15:35   ` Christoph Hellwig
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 14/17] block: support FALLOC_FL_PUNCH_HOLE trimming Paolo Bonzini
2012-03-09  8:20   ` Chris Wedgwood
2012-03-09  8:31     ` Paolo Bonzini
2012-03-09  8:35       ` Chris Wedgwood
2012-03-09  8:40         ` Paolo Bonzini
2012-03-09 10:31   ` Stefan Hajnoczi
2012-03-09 10:43     ` Paolo Bonzini
2012-03-09 10:53       ` Stefan Hajnoczi
2012-03-09 10:57         ` Paolo Bonzini
2012-03-09 20:36   ` Richard Laager
2012-03-12  9:34     ` Paolo Bonzini
2012-03-24 15:40     ` Christoph Hellwig
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 15/17] raw: add get_info Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 16/17] qemu-io: fix the alloc command Paolo Bonzini
2012-03-08 17:15 ` [Qemu-devel] [RFC PATCH 17/17] raw: implement is_allocated Paolo Bonzini
2012-03-24 15:42   ` 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.