Skip to content

block: use QEMU_PACKED for on-disk structures

Jeff Cody qemu-devel 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesApplied
  2. v15 patches 8 repliesSuperseded

Changes in v2 from the cover letter

Dropped the "cow" format patch. This means "cow" is non-portable, but it keeps behavior the same on x86_64. (Richard Henderson)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4block: vdi - use QEMU_PACKED for on-disk structuresblock/vdi.c+1 -10 replies
2/4block: vpc - use QEMU_PACKED for on-disk structuresblock/vpc.c+14 -140 replies
3/4block: qcow2 - used QEMU_PACKED for on-disk structuresblock/qcow2.c block/qcow2.h+2 -20 replies
4/4block: qed - use QEMU_PACKED for on-disk structuresblock/qed.h+1 -10 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard Henderson
SeriesR-b
1/4
2/4
3/4
4/4

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/4] block: use QEMU_PACKED for on-disk structures

v2 changes:
Dropped the "cow" format patch. This means "cow" is non-portable, but it keeps behavior the same on x86_64. (Richard Henderson)

Moved QEMU_PACKED to after the struct definition closing brace, to keep it more stylistically in-line with other QEMU_PACKED useage (Kevin Wolf)

Original description:

Several block image formats did not consistently use packed attributes when directly reading / writing structures from disk (mainly image format headers).

These series updates the image formats (see list below), to use QEMU_PACKED for on-disk structs. (Some minor code cleanup may also have ensued, to keep checkpatch.pl happy)

Jeff Cody (4):
block: vdi - use QEMU_PACKED for on-disk structures
block: vpc - use QEMU_PACKED for on-disk structures
block: qcow2 - used QEMU_PACKED for on-disk structures
block: qed - use QEMU_PACKED for on-disk structures

 block/qcow2.c |  2 +-
 block/qcow2.h |  2 +-
 block/qed.h   |  2 +-
 block/vdi.c   |  2 +-
 block/vpc.c   | 28 ++++++++++++++--------------
 5 files changed, 18 insertions(+), 18 deletions(-)
Signature · 1 line
1.8.3.1