qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6942] remove dead code in bdrv_check_request (Christoph Hellwig)
@ 2009-03-29  1:31 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-03-29  1:31 UTC (permalink / raw)
  To: qemu-devel

Revision: 6942
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6942
Author:   aliguori
Date:     2009-03-29 01:31:48 +0000 (Sun, 29 Mar 2009)
Log Message:
-----------
remove dead code in bdrv_check_request (Christoph Hellwig)

Remove code dealing with negative sector numbers for byte access in
bdrv_check_request as sector numbers can't ever be negative.

Previously we supported negative sector counts for byte access, but
never sector numbers.


Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/block.c

Modified: trunk/block.c
===================================================================
--- trunk/block.c	2009-03-29 01:28:29 UTC (rev 6941)
+++ trunk/block.c	2009-03-29 01:31:48 UTC (rev 6942)
@@ -569,15 +569,7 @@
 static int bdrv_check_request(BlockDriverState *bs, int64_t sector_num,
                               int nb_sectors)
 {
-    int64_t offset;
-
-    /* Deal with byte accesses */
-    if (sector_num < 0)
-        offset = -sector_num;
-    else
-        offset = sector_num * 512;
-
-    return bdrv_check_byte_request(bs, offset, nb_sectors * 512);
+    return bdrv_check_byte_request(bs, sector_num * 512, nb_sectors * 512);
 }
 
 /* return < 0 if error. See bdrv_write() for the return codes */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-29  1:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29  1:31 [Qemu-devel] [6942] remove dead code in bdrv_check_request (Christoph Hellwig) Anthony Liguori

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