diff options
author | Jens Axboe <axboe@fb.com> | 2014-09-15 18:51:32 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-15 18:51:32 -0600 |
commit | b7c88f86c9a5a92883effc1f119f6c7b36d087e0 (patch) | |
tree | 378f2af1dee080c4eb036d92f1532fce6cb9d64c | |
parent | 8a91fd4b0d42c730d48b5cd672df869609975a0a (diff) | |
download | fio-b7c88f86c9a5a92883effc1f119f6c7b36d087e0.tar.gz fio-b7c88f86c9a5a92883effc1f119f6c7b36d087e0.tar.bz2 |
options: fix single use if / for bssplit
It was buggy in that it did not extend to 100%, if nobody else
was part of the group.
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | options.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -133,7 +133,7 @@ static int bssplit_ddir(struct thread_options *o, int ddir, char *str) perc += bsp->perc; } - if (perc > 100) { + if (perc > 100 && perc_missing > 1) { log_err("fio: bssplit percentages add to more than 100%%\n"); free(bssplit); return 1; @@ -143,6 +143,8 @@ static int bssplit_ddir(struct thread_options *o, int ddir, char *str) * them. */ if (perc_missing) { + if (perc_missing == 1) + perc = 100; for (i = 0; i < o->bssplit_nr[ddir]; i++) { struct bssplit *bsp = &bssplit[i]; |