mirror of
https://github.com/Zygo/bees.git
synced 2025-07-01 00:02:27 +02:00
roots: don't share a RootFetcher between threads
If the send workaround is enabled, it is possible for two threads (a thread running the crawl_new task, and a thread attempting to apply the send workaround) to access the same RootFetcher object at the same time. That never ends well. Give each function its own BtrfsRootFetcher object. Fixes: https://github.com/Zygo/bees/issues/250 Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -534,7 +534,6 @@ class BeesScanMode;
|
||||
class BeesRoots : public enable_shared_from_this<BeesRoots> {
|
||||
shared_ptr<BeesContext> m_ctx;
|
||||
|
||||
BtrfsRootFetcher m_root_fetcher;
|
||||
BeesStringFile m_crawl_state_file;
|
||||
map<uint64_t, shared_ptr<BeesCrawl>> m_root_crawl_map;
|
||||
mutex m_mutex;
|
||||
|
Reference in New Issue
Block a user