All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled()
@ 2013-07-18  8:37 Peter Lieven
  2013-07-18 11:02 ` Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peter Lieven @ 2013-07-18  8:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, pbonzini, Peter Lieven, stefanha

Signed-off-by: Peter Lieven <pl@kamp.de>
---
 block.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block.c b/block.c
index b560241..c7f0197 100644
--- a/block.c
+++ b/block.c
@@ -2250,7 +2250,7 @@ int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num,
 
     enabled = bs->io_limits_enabled;
     bs->io_limits_enabled = false;
-    ret = bdrv_read(bs, 0, buf, 1);
+    ret = bdrv_read(bs, sector_num, buf, nb_sectors);
     bs->io_limits_enabled = enabled;
     return ret;
 }
-- 
1.7.9.5

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

* Re: [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled()
  2013-07-18  8:37 [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled() Peter Lieven
@ 2013-07-18 11:02 ` Paolo Bonzini
  2013-07-19  4:28 ` Stefan Hajnoczi
  2013-07-19  9:14 ` Kevin Wolf
  2 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2013-07-18 11:02 UTC (permalink / raw)
  To: Peter Lieven; +Cc: kwolf, qemu-devel, stefanha

Il 18/07/2013 10:37, Peter Lieven ha scritto:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>  block.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block.c b/block.c
> index b560241..c7f0197 100644
> --- a/block.c
> +++ b/block.c
> @@ -2250,7 +2250,7 @@ int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num,
>  
>      enabled = bs->io_limits_enabled;
>      bs->io_limits_enabled = false;
> -    ret = bdrv_read(bs, 0, buf, 1);
> +    ret = bdrv_read(bs, sector_num, buf, nb_sectors);
>      bs->io_limits_enabled = enabled;
>      return ret;
>  }
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

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

* Re: [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled()
  2013-07-18  8:37 [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled() Peter Lieven
  2013-07-18 11:02 ` Paolo Bonzini
@ 2013-07-19  4:28 ` Stefan Hajnoczi
  2013-07-19  9:14 ` Kevin Wolf
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2013-07-19  4:28 UTC (permalink / raw)
  To: Peter Lieven; +Cc: kwolf, pbonzini, qemu-devel

On Thu, Jul 18, 2013 at 10:37:32AM +0200, Peter Lieven wrote:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>  block.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

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

* Re: [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled()
  2013-07-18  8:37 [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled() Peter Lieven
  2013-07-18 11:02 ` Paolo Bonzini
  2013-07-19  4:28 ` Stefan Hajnoczi
@ 2013-07-19  9:14 ` Kevin Wolf
  2013-07-19  9:36   ` Peter Lieven
  2 siblings, 1 reply; 5+ messages in thread
From: Kevin Wolf @ 2013-07-19  9:14 UTC (permalink / raw)
  To: Peter Lieven; +Cc: pbonzini, qemu-devel, stefanha

Am 18.07.2013 um 10:37 hat Peter Lieven geschrieben:
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
>  block.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block.c b/block.c
> index b560241..c7f0197 100644
> --- a/block.c
> +++ b/block.c
> @@ -2250,7 +2250,7 @@ int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num,
>  
>      enabled = bs->io_limits_enabled;
>      bs->io_limits_enabled = false;
> -    ret = bdrv_read(bs, 0, buf, 1);
> +    ret = bdrv_read(bs, sector_num, buf, nb_sectors);
>      bs->io_limits_enabled = enabled;
>      return ret;
>  }

Reviewed-by: Kevin Wolf <kwolf@redhat.com>

The commit message would have deserved a comment about the impact. The
only caller is passing 0 as sector_num and 1 as nb_sectors, so this
doesn't change the behaviour in practice. (Which is the reason why it's
not for qemu-stable.)

Kevin

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

* Re: [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled()
  2013-07-19  9:14 ` Kevin Wolf
@ 2013-07-19  9:36   ` Peter Lieven
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Lieven @ 2013-07-19  9:36 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: pbonzini, qemu-devel, stefanha

On 19.07.2013 11:14, Kevin Wolf wrote:
> Am 18.07.2013 um 10:37 hat Peter Lieven geschrieben:
>> Signed-off-by: Peter Lieven <pl@kamp.de>
>> ---
>>   block.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block.c b/block.c
>> index b560241..c7f0197 100644
>> --- a/block.c
>> +++ b/block.c
>> @@ -2250,7 +2250,7 @@ int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num,
>>   
>>       enabled = bs->io_limits_enabled;
>>       bs->io_limits_enabled = false;
>> -    ret = bdrv_read(bs, 0, buf, 1);
>> +    ret = bdrv_read(bs, sector_num, buf, nb_sectors);
>>       bs->io_limits_enabled = enabled;
>>       return ret;
>>   }
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
>
> The commit message would have deserved a comment about the impact. The
> only caller is passing 0 as sector_num and 1 as nb_sectors, so this
> doesn't change the behaviour in practice. (Which is the reason why it's
> not for qemu-stable.)
Yes, I only spotted it while working on 4KN support.

Peter

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

end of thread, other threads:[~2013-07-19  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-18  8:37 [Qemu-devel] [PATCH] block: fix bdrv_read_unthrottled() Peter Lieven
2013-07-18 11:02 ` Paolo Bonzini
2013-07-19  4:28 ` Stefan Hajnoczi
2013-07-19  9:14 ` Kevin Wolf
2013-07-19  9:36   ` Peter Lieven

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.