Skip to content

Commit

Permalink
qemu-img bench: Fix uninitialised writethrough mode
Browse files Browse the repository at this point in the history
If no -t option is specified, bool writethrough stayed uninitialised.
Initialise it as false, which makes cache=writeback the default cache
mode.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
kevmw committed Jun 16, 2016
1 parent 9e19036 commit 604e861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qemu-img.c
Expand Up @@ -3570,7 +3570,7 @@ static int img_bench(int argc, char **argv)
BlockBackend *blk = NULL;
BenchData data = {};
int flags = 0;
bool writethrough;
bool writethrough = false;
struct timeval t1, t2;
int i;

Expand Down

0 comments on commit 604e861

Please sign in to comment.