Skip to content

Commit

Permalink
Merge pull request #12864 from gaurav36/bug-18422-rbd-bench-write-cra…
Browse files Browse the repository at this point in the history
…sh-4G-io-size

rbd: bench-write should return error if io-size >= 4G

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed Jan 12, 2017
2 parents 5b97cce + 6ab73e5 commit 59d0207
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tools/rbd/action/Bench.cc
Expand Up @@ -196,6 +196,11 @@ int do_bench(librbd::Image& image, io_type_t io_type,
return -EINVAL;
}

if (io_size > std::numeric_limits<uint32_t>::max()) {
std::cerr << "rbd: io-size should be less than 4G" << std::endl;
return -EINVAL;
}

rbd_bencher b(&image, io_type, io_size);

std::cout << "bench "
Expand Down

0 comments on commit 59d0207

Please sign in to comment.