Received: from [140.186.70.92] (port=58752 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHdx6-0007nt-UK for qemu-devel@nongnu.org; Thu, 27 May 2010 10:20:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHdx5-0008Mv-Lh for qemu-devel@nongnu.org; Thu, 27 May 2010 10:20:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16044) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHdx5-0008Mj-B0 for qemu-devel@nongnu.org; Thu, 27 May 2010 10:20:51 -0400 From: Jes.Sorensen@redhat.com Date: Thu, 27 May 2010 16:20:29 +0200 Message-Id: <1274970033-24093-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] Cleanups for block code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: Jes Sorensen , qemu-devel@nongnu.org From: Jes Sorensen 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(-)