All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] Alignment checks cleanup
@ 2019-08-27 18:59 Nir Soffer
  2019-08-27 18:59 ` [Qemu-devel] [PATCH v2 1/2] block: Use QEMU_IS_ALIGNED Nir Soffer
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Nir Soffer @ 2019-08-27 18:59 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Fam Zheng, qemu-block, Juan Quintela,
	Dr. David Alan Gilbert, Max Reitz, Nir Soffer, Stefan Hajnoczi

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(-)

-- 
2.20.1



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

end of thread, other threads:[~2019-09-10 10:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27 18:59 [Qemu-devel] [PATCH v2 0/2] Alignment checks cleanup Nir Soffer
2019-08-27 18:59 ` [Qemu-devel] [PATCH v2 1/2] block: Use QEMU_IS_ALIGNED Nir Soffer
2019-08-27 18:59 ` [Qemu-devel] [PATCH v2 2/2] block: Remove unused masks Nir Soffer
2019-08-28 10:44   ` Juan Quintela
2019-08-28 19:12   ` [Qemu-devel] [Qemu-block] " John Snow
2019-08-28 19:15 ` [Qemu-devel] [Qemu-block] [PATCH v2 0/2] Alignment checks cleanup John Snow
2019-08-30 20:25   ` Nir Soffer
2019-09-05  8:45     ` Nir Soffer
2019-09-10 10:42 ` [Qemu-devel] " Max Reitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.