mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
Merge pull request #6677 from jack-changtao/test-bench
rados: bench: fix off-by-one to avoid writing past object_size Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
c80945fb60
@ -195,7 +195,8 @@ void Bencher::run_bench()
|
||||
default: {
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
ops++;
|
||||
}
|
||||
drain_ops();
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
boost::tuple<string, uint64_t, uint64_t, Bencher::OpType> ret =
|
||||
boost::make_tuple(*object_pos, cur_pos, length, (*op_dist)());
|
||||
cur_pos += length;
|
||||
if (cur_pos > size) {
|
||||
if (cur_pos >= size) {
|
||||
cur_pos = 0;
|
||||
++object_pos;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user