Skip to content

Remove bdrv_read() and bdrv_write()

Alberto Garcia qemu-devel 2 versions – Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 10 repliesApplied
  2. v15 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Patch 2: Add QEMU_BUILD_BUG_ON(sizeof(VdiHeader) != 512) [Kevin] Correct size parameter in bdrv_pwrite() call [Kevin] Return 0 on success, never a positive number [Kevin]
- Patch 3: Check that the return values of bdrv_pread()/bdrv_pwrite()

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5qcow2: Replace bdrv_write() with bdrv_pwrite()block/qcow2-refcount.c+2 -21 reply
2/5vdi: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}()block/vdi.c+9 -62 replies
3/5vvfat: Replace bdrv_{read, write}() with bdrv_{pread, pwrite}()block/vvfat.c+7 -54 replies
4/5block: Remove bdrv_read() and bdrv_write()block/io.c include/block/block.h+7 -401 reply
5/5qcow2: Remove BDRVQcow2State.cluster_sectorsblock/qcow2.c block/qcow2.h+0 -21 reply

Reviews trailers per patch

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

PatchVladimir Sementsov-Ogievskiy
1/5R-b
2/5R-b
3/5
4/5R-b
5/5R-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 [Qemu-devel] [PATCH v2 0/5] Remove bdrv_read() and bdrv_write()

Hi,

this API only had a few users left so it can be easily removed.

Regards,

Berto

v2:
- Patch 2: Add QEMU_BUILD_BUG_ON(sizeof(VdiHeader) != 512) [Kevin] Correct size parameter in bdrv_pwrite() call [Kevin] Return 0 on success, never a positive number [Kevin]
- Patch 3: Check that the return values of bdrv_pread()/bdrv_pwrite()

           are strictly < 0 for errors, not simply != 0 [Kevin]

- Patch 4: Reuse the documenation of bdrv_write() for bdrv_pwrite()

v1: https://lists.gnu.org/archive/html/qemu-block/2019-04/msg00832.html

Output of 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:[----] [--] 'qcow2: Replace bdrv_write() with bdrv_pwrite()' 002/5:[0006] [FC] 'vdi: Replace bdrv_{read,write}() with bdrv_{pread,pwrite}()' 003/5:[0004] [FC] 'vvfat: Replace bdrv_{read,write}() with bdrv_{pread,pwrite}()' 004/5:[0007] [FC] 'block: Remove bdrv_read() and bdrv_write()' 005/5:[----] [--] 'qcow2: Remove BDRVQcow2State.cluster_sectors'

Alberto Garcia (5):
qcow2: Replace bdrv_write() with bdrv_pwrite()
vdi: Replace bdrv_{read,write}() with bdrv_{pread,pwrite}()
vvfat: Replace bdrv_{read,write}() with bdrv_{pread,pwrite}()
block: Remove bdrv_read() and bdrv_write()
qcow2: Remove BDRVQcow2State.cluster_sectors

 block/io.c             | 43 +++++++------------------------------------
 block/qcow2-refcount.c |  4 ++--
 block/qcow2.c          |  1 -
 block/qcow2.h          |  1 -
 block/vdi.c            | 15 +++++++++------
 block/vvfat.c          | 12 +++++++-----
 include/block/block.h  |  4 ----
 7 files changed, 25 insertions(+), 55 deletions(-)
Signature · 1 line
2.11.0