[io_generator] Fix address boundary for doing IO

Limit the addresses to be within the specified range
This commit is contained in:
Ming-Hung Tsai 2020-06-26 23:04:15 +08:00
parent 8aaea7f45b
commit ce8945e829

View File

@ -48,8 +48,10 @@ namespace {
base::sector_t next_offset() { base::sector_t next_offset() {
sector_t r = current_; sector_t r = current_;
current_ += block_size_; current_ += block_size_;
if (current_ > end_) if (current_ > end_) {
current_ = begin_; current_ = begin_;
return begin_;
}
return r; return r;
} }