diff options
author | Sage Weil <sage@inktank.com> | 2013-08-23 22:20:55 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-23 22:20:55 -0700 |
commit | fcb7e86101c6d85d7d6bfebde2edeb6cc4e7d9f6 (patch) | |
tree | 9610dfc40c66a1187f3bc9536c0cf646302faebc | |
parent | a4cca31c82bf0e84272e01eb1b3188dfdb5b5615 (diff) | |
download | ceph-fcb7e86101c6d85d7d6bfebde2edeb6cc4e7d9f6.tar.gz |
limit how long flusher holds the lockwip-cache-stall
-rw-r--r-- | src/osdc/ObjectCacher.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 51fad699555..2d721e75887 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -1429,8 +1429,10 @@ void ObjectCacher::flusher_entry() utime_t cutoff = ceph_clock_now(cct); cutoff -= max_dirty_age; BufferHead *bh = 0; + int max = 20; 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; bh_write(bh); } |