From: Jes.Sorensen@redhat.com
To: anthony@codemonkey.ws
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 0/4] Cleanups for block code
Date: Thu, 27 May 2010 16:20:29 +0200 [thread overview]
Message-ID: <1274970033-24093-1-git-send-email-Jes.Sorensen@redhat.com> (raw)
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(-)
next reply other threads:[~2010-05-27 14:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 14:20 Jes.Sorensen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274970033-24093-1-git-send-email-Jes.Sorensen@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).