Skip to content

Split qcow2 driver

Kevin Wolf qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4qcow2: Split out refcount handlingMakefile block/qcow2-refcount.c block/qcow2.c +1 more+966 -8700 replies
2/4qcow2: Split out guest cluster functionsMakefile block/qcow2-cluster.c block/qcow2-refcount.c +2 more+820 -7680 replies
3/4qcow2: Split out snapshot functionsMakefile block/qcow2-snapshot.c block/qcow2.c +1 more+422 -3920 replies
4/4qcow2: Rename global functionsblock/qcow2-cluster.c block/qcow2-refcount.c block/qcow2-snapshot.c +2 more+125 -1210 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/4] Split qcow2 driver

The current qcow2 code is a monster of 3000 lines of code. This is hardly manageable and doesn't exactly improve the driver's structure.

This patch series tries to split the driver in smaller modules. It doesn't contain changes to functionality or structure, especially the latter might come later as this series makes it much clearer what the internal interfaces used by the qcow2 driver actually are.

The first three patches mainly move code around. They also build up a qcow2.h header file which contains the common structs and functions used by several modules. Some functions need to become global to keep things compilable.

The fourth patch cleans up the global namespace by adding a qcow2_ prefix to all of the new global functions introduced by the first patches.

Kevin Wolf (4):
qcow2: Split out refcount handling
qcow2: Split out guest cluster functions
qcow2: Split out snapshot functions
qcow2: Rename global functions

 Makefile               |    4 +-
 block/qcow2-cluster.c  |  755 ++++++++++++++++++
 block/qcow2-refcount.c |  836 +++++++++++++++++++
 block/qcow2-snapshot.c |  405 ++++++++++
 block/qcow2.c          | 2081 +-----------------------------------------------
 block/qcow2.h          |  203 +++++
 6 files changed, 2233 insertions(+), 2051 deletions(-)
 create mode 100644 block/qcow2-cluster.c
 create mode 100644 block/qcow2-refcount.c
 create mode 100644 block/qcow2-snapshot.c
 create mode 100644 block/qcow2.h