Skip to content

Commit

Permalink
Merge pull request #10304 from ukernel/wip-16610
Browse files Browse the repository at this point in the history
ObjectCacher: fix last_write check in bh_write_adjacencies()
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
  • Loading branch information
gregsfortytwo committed Jul 26, 2016
2 parents 2dbff88 + ce166c2 commit 40b7016
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/osdc/ObjectCacher.cc
Expand Up @@ -888,7 +888,7 @@ void ObjectCacher::bh_write_adjacencies(BufferHead *bh, ceph::real_time cutoff,
BufferHead *obh = *p;
if (obh->ob != bh->ob)
break;
if (obh->is_dirty() && obh->last_write < cutoff) {
if (obh->is_dirty() && obh->last_write <= cutoff) {
blist.push_back(obh);
++count;
total_len += obh->length();
Expand All @@ -903,7 +903,7 @@ void ObjectCacher::bh_write_adjacencies(BufferHead *bh, ceph::real_time cutoff,
BufferHead *obh = *it;
if (obh->ob != bh->ob)
break;
if (obh->is_dirty() && obh->last_write < cutoff) {
if (obh->is_dirty() && obh->last_write <= cutoff) {
blist.push_front(obh);
++count;
total_len += obh->length();
Expand Down Expand Up @@ -1778,7 +1778,7 @@ void ObjectCacher::flusher_entry()
int max = MAX_FLUSH_UNDER_LOCK;
while ((bh = static_cast<BufferHead*>(bh_lru_dirty.
lru_get_next_expire())) != 0 &&
bh->last_write < cutoff &&
bh->last_write <= cutoff &&
max > 0) {
ldout(cct, 10) << "flusher flushing aged dirty bh " << *bh << dendl;
if (scattered_write) {
Expand Down

0 comments on commit 40b7016

Please sign in to comment.