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

Max Reitz posted 7 patches 4 years, 9 months ago
Test FreeBSD passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test s390x passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190712173600.14554-1-mreitz@redhat.com
Maintainers: Stefan Hajnoczi <stefanha@redhat.com>, Max Reitz <mreitz@redhat.com>, "Denis V. Lunev" <den@openvz.org>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Peter Lieven <pl@kamp.de>, Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
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
[Qemu-devel] [PATCH 0/7] block: Generic file creation fallback
Posted by Max Reitz 4 years, 9 months ago
Hi,

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
series.)

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:

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/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

-- 
2.21.0


Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] block: Generic file creation fallback
Posted by Maxim Levitsky 4 years, 7 months ago
On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote:
> Hi,
> 
> 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
> series.)
> 
> 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.
> 

Hi!
Do you have any update on this patch series by a chance?

Best regards,
	Maxim Levitsky


Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] block: Generic file creation fallback
Posted by Max Reitz 4 years, 7 months ago
On 05.09.19 15:30, Maxim Levitsky wrote:
> On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote:
>> Hi,
>>
>> 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
>> series.)
>>
>> 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.
>>
> 
> Hi!
> Do you have any update on this patch series by a chance?

Unfortunately, no.  I was on PTO, and before that, there was just too
much else going on.  (And frankly, there’s still too much else going on.)

Max

Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] block: Generic file creation fallback
Posted by Maxim Levitsky 4 years, 7 months ago
On Tue, 2019-09-10 at 11:16 +0200, Max Reitz wrote:
> On 05.09.19 15:30, Maxim Levitsky wrote:
> > On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote:
> > > Hi,
> > > 
> > > 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
> > > series.)
> > > 
> > > 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.
> > > 
> > 
> > Hi!
> > Do you have any update on this patch series by a chance?
> 
> Unfortunately, no.  I was on PTO, and before that, there was just too
> much else going on.  (And frankly, there’s still too much else going on.)

No problem!


Best regards,
	Maxim Levitsky