The bytes not in cache stat was potentially reading the bh length
from a deleted bufferhead.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
5ccc4422d6172376bd6f1be8d3a99c0a54eab807)
++bh_it) {
uint64_t rx_bytes = static_cast<uint64_t>(
stat_rx + bh_it->second->length());
+ bytes_not_in_cache += bh_it->second->length();
if (!waitfor_read.empty() || rx_bytes > max_size) {
// cache is full with concurrent reads -- wait for rx's to complete
// to constrain memory growth (especially during copy-ups)
bh_it->second->waitfor_read[bh_it->first].push_back( new C_RetryRead(this, rd, oset, onfinish) );
}
}
- bytes_not_in_cache += bh_it->second->length();
success = false;
}