qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] remove dead code in bdrv_check_request
Date: Sat, 28 Mar 2009 20:33:22 -0500	[thread overview]
Message-ID: <49CECFE2.8050200@us.ibm.com> (raw)
In-Reply-To: <20090328183109.GA25497@lst.de>

Christoph Hellwig wrote:
> 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>
>   

Applied.  Thanks for resending this.

Regards,

Anthony Liguori

> Index: qemu/block.c
> ===================================================================
> --- qemu.orig/block.c	2009-03-14 14:34:49.000000000 +0100
> +++ qemu/block.c	2009-03-14 14:35:12.000000000 +0100
> @@ -546,15 +546,7 @@ static int bdrv_check_byte_request(Block
>  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 */
>
>
>
>   

      reply	other threads:[~2009-03-29  1:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-14 13:00 [Qemu-devel] [PATCH] fix bdrv_check_request for byte-granularity requests Christoph Hellwig
2009-03-14 13:35 ` Christoph Hellwig
2009-03-28 16:21   ` Anthony Liguori
2009-03-28 18:31     ` [Qemu-devel] [PATCH] remove dead code in bdrv_check_request Christoph Hellwig
2009-03-29  1:33       ` Anthony Liguori [this message]

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=49CECFE2.8050200@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --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).