Re: [Qemu-block] [PATCH 3/9] block: Track discard requests

2015-10-28 Thread Fam Zheng
On Wed, 10/28 10:54, Kevin Wolf wrote: > > -return 0; > > +out: > > +tracked_request_end(); > > +return ret; > > } > > I would prefer an explicit ret = 0 before the out label because > otherwise you're relying on the previous value that has been set > somewhere in the loop. As far as

[Qemu-block] [PATCH 3/9] block: Track discard requests

2015-10-26 Thread Fam Zheng
Both bdrv_discard and bdrv_aio_discard will call into bdrv_co_discard, so add tracked_request_begin/end calls around the loop. Signed-off-by: Fam Zheng --- block/io.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/block/io.c b/block/io.c