triggering request is big enough
If the size of the read triggering the continuing readahead is such big
that exceeding m_readahead_pos, should do the readahead starting from
m_last_pos.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
} else {
// continuing readahead trigger
m_readahead_size *= 2;
+ if (m_last_pos > m_readahead_pos) {
+ m_readahead_pos = m_last_pos;
+ }
}
m_readahead_size = MAX(m_readahead_size, m_readahead_min_bytes);
m_readahead_size = MIN(m_readahead_size, m_readahead_max_bytes);