block: fix bdrv_read_unthrottled()
PATCH 1/1 block: fix bdrv_read_unthrottled()
--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block.c +1 -1
@@ -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; }
Signature · 1 line
1.7.9.5
Il 18/07/2013 10:37, Peter Lieven ha scritto:
Quoted 11 lines
Signed-off-by Peter Lieven <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block.c +0
-0
block.c int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num, · line 2256
Quoted 8 lines
block.c +1
-1@@ -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; }
Stefan Hajnoczi
AppliedQuoted 4 lines · Peter Lieven
Signed-off-by Peter Lieven <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
Am 18.07.2013 um 10:37 hat Peter Lieven geschrieben:
Quoted 10 lines
Signed-off-by Peter Lieven <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block.c +0
-0
block.c int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num, · line 2256
Quoted 8 lines
block.c +1
-1@@ -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; }
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
Quoted 21 lines · Kevin Wolf
Am 18.07.2013 um 10:37 hat Peter Lieven geschrieben:
Quoted 10 lines
Signed-off-by Peter Lieven <[email protected]>--- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)block.c +0
-0block.c int bdrv_read_unthrottled(BlockDriverState *bs, int64_t sector_num, · line 2256
Quoted 8 lines
block.c +1
-1@@ -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 <[email protected]>
Quoted 4 lines
The commit message would have deserved a comment about the impact. The only caller is passing 0 as
sector_numand 1 asnb_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