Skip to content

Alignment checks cleanup

Nir Soffer qemu-devel 1 version Applied

Status from this message: Thanks, applied to my block branch:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 6 repliesApplied

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2block: Use QEMU_IS_ALIGNEDblock/bochs.c block/cloop.c block/dmg.c +5 more+19 -190 replies
2/2block: Remove unused masksinclude/block/block.h migration/block.c+1 -32 replies

Reviews trailers per patch

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

PatchJuan QuintelaJohn Snow
SeriesR-b
1/2
2/2R-b R-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/2] Alignment checks cleanup

While working on 4k support, I noticed that there is lot of code using BDRV_SECTOR_SIZE (512) for checking alignment. I wonder how this can work with 4k storage.

Lets start by cleaning up to make the code easier to understand:
- Use QEMU_IS_ALIGNED macro to check alignment
- Remove unneeded masks based on BDRV_SECTOR_SIZE

Nir Soffer (2):
block: Use QEMU_IS_ALIGNED
block: Remove unused masks

 block/bochs.c         | 4 ++--
 block/cloop.c         | 4 ++--
 block/dmg.c           | 4 ++--
 block/io.c            | 8 ++++----
 block/qcow2-cluster.c | 4 ++--
 block/qcow2.c         | 4 ++--
 block/vvfat.c         | 8 ++++----
 include/block/block.h | 2 --
 migration/block.c     | 2 +-
 qemu-img.c            | 2 +-
 10 files changed, 20 insertions(+), 22 deletions(-)
Signature · 1 line
2.20.1