if (!could_consume) {
// Usually, it is not necessary to explicitly flush here, because the reader
// will get flushes generated inside Journaler::is_readable. However,
- // if we remain in a can_consume()==false state for a long period then
+ // if we remain in a _can_consume()==false state for a long period then
// we should flush in order to allow MDCache to drop its strays rather
// than having them wait for purgequeue to progress.
if (!delayed_flush) {
return ops_required;
}
-bool PurgeQueue::can_consume()
+bool PurgeQueue::_can_consume()
{
dout(20) << ops_in_flight << "/" << max_purge_ops << " ops, "
<< in_flight.size() << "/" << g_conf->mds_max_purge_files
assert(lock.is_locked_by_me());
bool could_consume = false;
- while(can_consume()) {
+ while(_can_consume()) {
if (delayed_flush) {
// We are now going to read from the journal, so any proactive
size_t *in_flight_count
)
{
+ Mutex::Locker l(lock);
+
assert(progress != nullptr);
assert(progress_total != nullptr);
assert(in_flight_count != nullptr);
uint32_t _calculate_ops(const PurgeItem &item) const;
- bool can_consume();
+ bool _can_consume();
// How many bytes were remaining when drain() was first called,
// used for indicating progress.