This is a background thread. However, CPU is wasted.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit
ca33241286f52d849dbde8092507131b8b1108cc)
Fixes: http://tracker.ceph.com/issues/17321
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
} /* rgw_fh */
} /* event::type::READDIR */
} /* ev */
+ std::this_thread::sleep_for(gc_interval);
} while (! stop);
} /* RGWLibFS::gc */
struct rgw_fs fs;
RGWFileHandle root_fh;
+ static constexpr std::chrono::seconds gc_interval =
+ std::chrono::seconds(120);
+
mutable std::atomic<uint64_t> refcnt;
RGWFileHandle::FHCache fh_cache;