qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] block: remove separate bdrv_file_open callback
@ 2022-12-12 13:16 Paolo Bonzini
  2022-12-12 13:16 ` [PATCH 1/3] block: apply assertion more widely Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Paolo Bonzini @ 2022-12-12 13:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block, kwolf

The presence of the bdrv_file_open callback is used in some parts of the
code to distinguish protocol and format drivers.  Use the existing
.protocol_name field instead, and unify .bdrv_open with .bdrv_file_open.

Paolo

Paolo Bonzini (3):
  block: apply assertion more widely
  block: do not check bdrv_file_open
  block: remove separate bdrv_file_open callback

 block.c                          | 17 +++++++----------
 block/blkdebug.c                 |  2 +-
 block/blkio.c                    |  2 +-
 block/blkverify.c                |  2 +-
 block/curl.c                     |  8 ++++----
 block/file-posix.c               |  8 ++++----
 block/file-win32.c               |  4 ++--
 block/gluster.c                  |  8 ++++----
 block/iscsi.c                    |  4 ++--
 block/nbd.c                      |  6 +++---
 block/nfs.c                      |  2 +-
 block/null.c                     |  4 ++--
 block/nvme.c                     |  2 +-
 block/rbd.c                      |  3 ++-
 block/ssh.c                      |  2 +-
 block/vvfat.c                    |  2 +-
 include/block/block_int-common.h |  3 ---
 17 files changed, 37 insertions(+), 42 deletions(-)

-- 
2.38.1



^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH 0/3] block: remove separate bdrv_file_open callback
@ 2023-03-09  8:50 Paolo Bonzini
  2023-03-09  9:37 ` Philippe Mathieu-Daudé
  2023-04-05 12:19 ` Paolo Bonzini
  0 siblings, 2 replies; 9+ messages in thread
From: Paolo Bonzini @ 2023-03-09  8:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-block

The value of the bdrv_file_open is sometimes checked to distinguish
protocol and format drivers, but apart from that there is no difference
between bdrv_file_open and bdrv_open.

However, they can all be distinguished by the non-NULL .protocol_name
member.  Change the checks to use .protocol_name instead of .bdrv_file_open,
and unify the two callbacks.

Paolo

Paolo Bonzini (3):
  block: make assertion more generic
  block: do not check bdrv_file_open
  block: remove separate bdrv_file_open callback

 block.c                          | 17 +++++++----------
 block/blkdebug.c                 |  2 +-
 block/blkio.c                    |  2 +-
 block/blkverify.c                |  2 +-
 block/curl.c                     |  8 ++++----
 block/file-posix.c               |  8 ++++----
 block/file-win32.c               |  4 ++--
 block/gluster.c                  |  8 ++++----
 block/iscsi.c                    |  4 ++--
 block/nbd.c                      |  6 +++---
 block/nfs.c                      |  2 +-
 block/null.c                     |  4 ++--
 block/nvme.c                     |  2 +-
 block/rbd.c                      |  3 ++-
 block/ssh.c                      |  2 +-
 block/vvfat.c                    |  2 +-
 include/block/block_int-common.h |  3 ---
 17 files changed, 37 insertions(+), 42 deletions(-)

-- 
2.39.2



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

end of thread, other threads:[~2023-04-21  9:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-12 13:16 [PATCH 0/3] block: remove separate bdrv_file_open callback Paolo Bonzini
2022-12-12 13:16 ` [PATCH 1/3] block: apply assertion more widely Paolo Bonzini
2022-12-12 13:16 ` [PATCH 2/3] block: do not check bdrv_file_open Paolo Bonzini
2023-01-19 13:17   ` Kevin Wolf
2023-04-21  9:35     ` Paolo Bonzini
2022-12-12 13:17 ` [PATCH 3/3] block: remove separate bdrv_file_open callback Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2023-03-09  8:50 [PATCH 0/3] " Paolo Bonzini
2023-03-09  9:37 ` Philippe Mathieu-Daudé
2023-04-05 12:19 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).