Skip to content

block: Generic file creation fallback

Max Reitz qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesIn review
  2. v17 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- Drop blk_truncate_for_formatting(): It doesn’t make sense to introduce this function any more after 26536c7fc25917d1bd13781f81fe3ab039643bff (“block: Do not truncate file node when formatting”), because we’d only use it in bdrv_create_file_fallback().
Thus, it makes more sense to create special helper functions specifically for bdrv_create_file_fallback().

- Thus, dropped patches 2 and 3.

- And changed patch 4 to include those helper functions.

- Rebased, which was a bit of a pain.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5block/nbd: Fix hang in .bdrv_close()block/nbd.c+13 -12 replies
2/5block: Generic file creation fallbackblock.c+147 -121 reply
3/5file-posix: Drop hdev_co_create_opts()block/file-posix.c+0 -670 replies
4/5iscsi: Drop iscsi_co_create_opts()block/iscsi.c+0 -560 replies
5/5iotests: Add test for image creation fallbacktests/qemu-iotests/259 tests/qemu-iotests/259.out tests/qemu-iotests/group+76 -02 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchMaxim LevitskyEric Blake
1/5R-b R-b
2/5
3/5R-b
4/5R-b
5/5R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] block: Generic file creation fallback

Hi,

As version 1, this series adds a fallback path for creating files (on the protocol layer) if the protocol driver does not support file creation, but the file already exists.

Branch: https://github.com/XanClic/qemu.git skip-proto-create-v2
Branch: https://git.xanclic.moe/XanClic/qemu.git skip-proto-create-v2

v2:
- Drop blk_truncate_for_formatting(): It doesn’t make sense to introduce this function any more after 26536c7fc25917d1bd13781f81fe3ab039643bff (“block: Do not truncate file node when formatting”), because we’d only use it in bdrv_create_file_fallback().
Thus, it makes more sense to create special helper functions specifically for bdrv_create_file_fallback().

- Thus, dropped patches 2 and 3.

- And changed patch 4 to include those helper functions.

- Rebased, which was a bit of a pain.

git-backport-diff against v1:

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/5:[----] [-C] 'block/nbd: Fix hang in .bdrv_close()' 002/5:[0080] [FC] 'block: Generic file creation fallback' 003/5:[----] [--] 'file-posix: Drop hdev_co_create_opts()' 004/5:[----] [--] 'iscsi: Drop iscsi_co_create_opts()' 005/5:[----] [-C] 'iotests: Add test for image creation fallback'

Max Reitz (5):
block/nbd: Fix hang in .bdrv_close()
block: Generic file creation fallback
file-posix: Drop hdev_co_create_opts()
iscsi: Drop iscsi_co_create_opts()
iotests: Add test for image creation fallback

 block.c                    | 159 ++++++++++++++++++++++++++++++++++---
 block/file-posix.c         |  67 ----------------
 block/iscsi.c              |  56 -------------
 block/nbd.c                |  14 +++-
 tests/qemu-iotests/259     |  61 ++++++++++++++
 tests/qemu-iotests/259.out |  14 ++++
 tests/qemu-iotests/group   |   1 +
 7 files changed, 236 insertions(+), 136 deletions(-)
 create mode 100755 tests/qemu-iotests/259
 create mode 100644 tests/qemu-iotests/259.out
Signature · 1 line
2.24.1