Skip to content

block: Preallocated truncate

Max Reitz qemu-devel 4 versions – Applied

Status from this message: Applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest16 patches 2 repliesApplied
  2. v316 patches 11 repliesSuperseded
  3. v216 patches 15 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v116 patches32 repliesSuperseded

Changes in v4 from the cover letter

- Patch 4:
- Note bug fix in commit message [Eric]
- "...may result in *slightly* more data being allocated..." [Eric]
- Patch 11:
- Drop the "image may now occupy more space than necessary" note -- that's always the case when preallocation failed, and I don't really want to mention it everywhere
- Flush metadata after preallocation [Stefan]

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/16block: Add PreallocMode to BD.bdrv_truncate()block.c block/blkdebug.c block/crypto.c +11 more+98 -150 replies
2/16block: Add PreallocMode to bdrv_truncate()block.c block/blkdebug.c block/block-backend.c +9 more+26 -360 replies
3/16block: Add PreallocMode to blk_truncate()block/block-backend.c block/commit.c block/mirror.c +12 more+27 -210 replies
4/16qemu-img: Expose PreallocMode for resizingqemu-img.c qemu-img.texi+36 -40 replies
5/16block/file-posix: Small fixes in raw_create()block/file-posix.c+3 -20 replies
6/16block/file-posix: Extract raw_regular_truncate()block/file-posix.c+78 -660 replies
7/16block/file-posix: Generalize raw_regular_truncateblock/file-posix.c+50 -110 replies
8/16block/file-posix: Preallocation for truncateblock/file-posix.c+10 -120 replies
9/16block/qcow2: Generalize preallocate()block/qcow2.c+12 -50 replies
10/16block/qcow2: Lock s->lock in preallocate()block/qcow2.c+15 -70 replies
11/16block/qcow2: Metadata preallocation for truncateblock/qcow2.c+31 -20 replies
12/16block/qcow2: Add qcow2_refcount_area()block/qcow2-refcount.c block/qcow2.c block/qcow2.h +1 more+204 -890 replies
13/16block/qcow2: Rename "fail_block" to just "fail"block/qcow2-refcount.c+7 -70 replies
14/16block/qcow2: falloc/full preallocating growthblock/qcow2-refcount.c block/qcow2.c block/qcow2.h+108 -90 replies
15/16iotests: Add preallocated resize test for rawtests/qemu-iotests/106 tests/qemu-iotests/106.out tests/qemu-iotests/group+143 -00 replies
16/16iotests: Add preallocated growth test for qcow2tests/qemu-iotests/125 tests/qemu-iotests/125.out tests/qemu-iotests/group+517 -00 replies

Reviews trailers per patch

13 of 16 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan HajnocziPhilippe Mathieu-DaudéEric Blake
SeriesR-b
1/16R-b
2/16R-b
3/16R-b
4/16
5/16R-b R-b
6/16R-b R-b
7/16R-b R-b
8/16R-b
9/16R-b R-b
10/16R-b R-b
11/16
12/16R-b
13/16R-b
14/16
15/16R-b
16/16R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 00/16] block: Preallocated truncate

=== Series dependencies ===

This series depends on v7 of Stefan's series
"qemu-img: add measure sub-command"
(http://lists.nongnu.org/archive/html/qemu-devel/2017-06/msg03035.html).

=== Actual cover letter ===

This series adds preallocation to bdrv_truncate() and subsequently qemu-img resize. This is implemented for qcow2 and raw only, just like preallocation for newly created images is. There is no runtime interface for this new parameter (yet).

v4:
- Patch 4:
- Note bug fix in commit message [Eric]
- "...may result in *slightly* more data being allocated..." [Eric]
- Patch 11:
- Drop the "image may now occupy more space than necessary" note -- that's always the case when preallocation failed, and I don't really want to mention it everywhere
- Flush metadata after preallocation [Stefan]

git-backport-diff against v3:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/16:[----] [--] 'block: Add PreallocMode to BD.bdrv_truncate()' 002/16:[----] [--] 'block: Add PreallocMode to bdrv_truncate()' 003/16:[----] [--] 'block: Add PreallocMode to blk_truncate()' 004/16:[0002] [FC] 'qemu-img: Expose PreallocMode for resizing' 005/16:[----] [--] 'block/file-posix: Small fixes in raw_create()' 006/16:[----] [--] 'block/file-posix: Extract raw_regular_truncate()' 007/16:[----] [--] 'block/file-posix: Generalize raw_regular_truncate' 008/16:[----] [--] 'block/file-posix: Preallocation for truncate' 009/16:[----] [--] 'block/qcow2: Generalize preallocate()' 010/16:[----] [--] 'block/qcow2: Lock s->lock in preallocate()' 011/16:[0013] [FC] 'block/qcow2: Metadata preallocation for truncate' 012/16:[----] [--] 'block/qcow2: Add qcow2_refcount_area()' 013/16:[----] [--] 'block/qcow2: Rename "fail_block" to just "fail"' 014/16:[----] [--] 'block/qcow2: falloc/full preallocating growth' 015/16:[----] [--] 'iotests: Add preallocated resize test for raw' 016/16:[----] [--] 'iotests: Add preallocated growth test for qcow2'

Max Reitz (16):
block: Add PreallocMode to BD.bdrv_truncate()
block: Add PreallocMode to bdrv_truncate()
block: Add PreallocMode to blk_truncate()
qemu-img: Expose PreallocMode for resizing block/file-posix: Small fixes in raw_create() block/file-posix: Extract raw_regular_truncate() block/file-posix: Generalize raw_regular_truncate block/file-posix: Preallocation for truncate block/qcow2: Generalize preallocate() block/qcow2: Lock s->lock in preallocate() block/qcow2: Metadata preallocation for truncate block/qcow2: Add qcow2_refcount_area() block/qcow2: Rename "fail_block" to just "fail" block/qcow2: falloc/full preallocating growth
iotests: Add preallocated resize test for raw
iotests: Add preallocated growth test for qcow2

 block/qcow2.h                  |   9 +
 include/block/block.h          |   3 +-
 include/block/block_int.h      |   3 +-
 include/sysemu/block-backend.h |   3 +-
 block.c                        |   5 +-
 block/blkdebug.c               |   5 +-
 block/block-backend.c          |   5 +-
 block/commit.c                 |   4 +-
 block/crypto.c                 |   4 +-
 block/file-posix.c             | 201 +++++++++++++--------
 block/file-win32.c             |   9 +-
 block/gluster.c                |   8 +-
 block/iscsi.c                  |   9 +-
 block/mirror.c                 |   3 +-
 block/nfs.c                    |   9 +-
 block/parallels.c              |  13 +-
 block/qcow.c                   |   8 +-
 block/qcow2-refcount.c         | 277 +++++++++++++++++++----------
 block/qcow2.c                  | 205 +++++++++++++++++++---
 block/qed.c                    |  11 +-
 block/raw-format.c             |   5 +-
 block/rbd.c                    |   9 +-
 block/sheepdog.c               |  11 +-
 block/vdi.c                    |   3 +-
 block/vhdx-log.c               |   2 +-
 block/vhdx.c                   |   8 +-
 block/vmdk.c                   |   7 +-
 block/vpc.c                    |   2 +-
 blockdev.c                     |   2 +-
 qemu-img.c                     |  33 +++-
 qemu-io-cmds.c                 |   2 +-
 qemu-img.texi                  |   7 +-
 tests/qemu-iotests/044.out     |   2 +-
 tests/qemu-iotests/106         |  92 ++++++++++
 tests/qemu-iotests/106.out     |  50 ++++++
 tests/qemu-iotests/125         | 130 ++++++++++++++
 tests/qemu-iotests/125.out     | 386 +++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/group       |   2 +
 38 files changed, 1313 insertions(+), 234 deletions(-)
 create mode 100755 tests/qemu-iotests/106
 create mode 100644 tests/qemu-iotests/106.out
 create mode 100755 tests/qemu-iotests/125
 create mode 100644 tests/qemu-iotests/125.out
Signature · 1 line
2.9.4