[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/7] block: Generic file creation fallback

From: Max Reitz
Subject: [Qemu-devel] [PATCH 0/7] block: Generic file creation fallback
Date: Fri, 12 Jul 2019 19:35:53 +0200


Kevin commented on my RFC, so I got what an RFC wants, and he didn’t
object to the creation fallback part.  So I suppose I can go down that
route at least.  (Which was actually the more important part of the

So as in the RFC, 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.

v1 (as compared to the RFC):
- Changed patch 1 to match Kevin’s proposal
- Added patches 2 and 3 to replace the truncation fallback
- Changed patch 4 accordingly
- Added patches 5 and 6
- Truncated patch 7 (haha!), because there no longer is a truncation
  fallback, so we cannot test it.

I would like to note that the diff stat without patches 1 and 7 is
141+, 139-.  So this series is basically a net zero for our code size,
but it prevents future series that might add such pseudo-creation
support to other drivers but file-posix (for host devices) and iscsi
(e.g. I’m looking at you, nvme).

git-backport-diff against the RFC:

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

Max Reitz (7):
  block/nbd: Fix hang in .bdrv_close()
  block: Add blk_truncate_for_formatting()
  block: Use blk_truncate_for_formatting()
  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

 include/sysemu/block-backend.h | 12 +++++
 block.c                        | 83 +++++++++++++++++++++++++++++-----
 block/block-backend.c          | 54 ++++++++++++++++++++++
 block/file-posix.c             | 67 ---------------------------
 block/iscsi.c                  | 56 -----------------------
 block/nbd.c                    | 14 +++++-
 block/parallels.c              |  2 +-
 block/qcow.c                   |  2 +-
 block/qcow2.c                  |  2 +-
 block/qed.c                    |  2 +-
 tests/qemu-iotests/259         | 61 +++++++++++++++++++++++++
 tests/qemu-iotests/259.out     | 14 ++++++
 tests/qemu-iotests/group       |  1 +
 13 files changed, 230 insertions(+), 140 deletions(-)
 create mode 100755 tests/qemu-iotests/259
 create mode 100644 tests/qemu-iotests/259.out


reply via email to

[Prev in Thread] Current Thread [Next in Thread]