Skip to content

Commit

Permalink
Merge pull request #10864: jewel: Jewel: segfault in ObjectCacher::Fl…
Browse files Browse the repository at this point in the history
…usherThread

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Aug 25, 2016
2 parents 0036efb + 2311ab2 commit 45f8663
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/osdc/ObjectCacher.cc
Original file line number Diff line number Diff line change
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 @@ -1746,7 +1746,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 45f8663

Please sign in to comment.