All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] Cleanups for block code
@ 2010-05-27 14:20 Jes.Sorensen
  2010-05-27 14:20 ` [Qemu-devel] [PATCH 1/4] Cleanup: bdrv_open() no need to shift total_size just to shift back Jes.Sorensen
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Jes.Sorensen @ 2010-05-27 14:20 UTC (permalink / raw)
  To: anthony; +Cc: Jes Sorensen, qemu-devel

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

Reading through some of the blk code, I noticed a lot of cases where
we mix and match between hard-coded values for the block size of 512
and using BDRV_SECTOR_SIZE. Trying to clean it up a bit and change the
512 constants to BDRV_SECTOR_SIZE as it is more explaning when reading
the code.

In addition it fixes up a case in bdrv_open where we did the division,
just to multiply back to the original value for no real reason.

Cheers,
Jes


Jes Sorensen (4):
  Cleanup: bdrv_open() no need to shift total_size just to shift back.
  Cleanup: Be consistent and use BDRV_SECTOR_SIZE instead of 512
  Cleanup: raw-posix.c: Be more consistent using BDRV_SECTOR_SIZE
    instead of 512
  Cleanup: virtio-blk.c: Be more consistent using BDRV_SECTOR_SIZE
    instead

 block.c           |   17 +++++++++--------
 block/raw-posix.c |   20 +++++++++++---------
 hw/virtio-blk.c   |    7 ++++---
 3 files changed, 24 insertions(+), 20 deletions(-)

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

end of thread, other threads:[~2010-05-28 13:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 14:20 [Qemu-devel] [PATCH 0/4] Cleanups for block code Jes.Sorensen
2010-05-27 14:20 ` [Qemu-devel] [PATCH 1/4] Cleanup: bdrv_open() no need to shift total_size just to shift back Jes.Sorensen
2010-05-27 14:20 ` [Qemu-devel] [PATCH 2/4] Cleanup: Be consistent and use BDRV_SECTOR_SIZE instead of 512 Jes.Sorensen
2010-05-27 14:20 ` [Qemu-devel] [PATCH 3/4] Cleanup: raw-posix.c: Be more consistent using " Jes.Sorensen
2010-05-27 14:20 ` [Qemu-devel] [PATCH 4/4] Cleanup: virtio-blk.c: Be more consistent using BDRV_SECTOR_SIZE instead Jes.Sorensen
2010-05-28 13:48 ` [Qemu-devel] [PATCH 0/4] Cleanups for block code Kevin Wolf

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.