diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2011-10-13 18:53:41 +0200 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2011-10-13 18:53:41 +0200 |
commit | 1f3b12e0d2b291d184daffd323bc69a0146ec116 (patch) | |
tree | fbaf73e8f2db6ebadbed05ffcaf81e6cd48ce7d4 | |
parent | cls_rgw: remove the write_bucket_dir function. (diff) | |
download | ceph-1f3b12e0d2b291d184daffd323bc69a0146ec116.tar.xz ceph-1f3b12e0d2b291d184daffd323bc69a0146ec116.zip |
osd: bound generate_past_intervals() by oldest map
The oldest osdmap we maintain is a lower bound on last_epoch_clean for the
entire system (assuming the monitor is doing it's job right). We can stop
generating past intervals when we hit it.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/osd/PG.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index b81079cfc90..0a91c53ad50 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -921,6 +921,8 @@ void PG::generate_past_intervals() epoch_t first_epoch = 0; epoch_t stop = MAX(info.history.epoch_created, info.history.last_epoch_clean); + if (stop < osd->superblock.oldest_map) + stop = osd->superblock.oldest_map; // this is a lower bound on last_epoch_clean cluster-wide. epoch_t last_epoch = info.history.same_interval_since - 1; dout(10) << __func__ << " over epochs " << stop << "-" << last_epoch << dendl; |