mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
context: remove limit on the number of references to an extent
Better toxic extent detection means we can now handle extents with many more references--easily hundreds of thousands. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
8bec9624da
commit
c2762740ef
@ -823,7 +823,7 @@ BeesContext::resolve_addr_uncached(BeesAddress addr)
|
||||
// Avoid performance bug
|
||||
BeesResolveAddrResult rv;
|
||||
rv.m_biors = log_ino.m_iors;
|
||||
if (sys_usage_delta < BEES_TOXIC_SYS_DURATION && log_ino.m_iors.size() < BEES_MAX_EXTENT_REF_COUNT) {
|
||||
if (sys_usage_delta < BEES_TOXIC_SYS_DURATION) {
|
||||
rv.m_is_toxic = false;
|
||||
} else {
|
||||
BEESLOGNOTICE("WORKAROUND: toxic address: addr = " << addr << ", sys_usage_delta = " << round(sys_usage_delta* 1000.0) / 1000.0 << ", user_usage_delta = " << round(user_usage_delta * 1000.0) / 1000.0 << ", rt_age = " << rt_age << ", refs " << log_ino.m_iors.size());
|
||||
|
@ -106,11 +106,6 @@ const size_t BEES_MAX_CRAWL_BATCH = 128;
|
||||
// Wait this many transids between crawls
|
||||
const size_t BEES_TRANSID_FACTOR = 10;
|
||||
|
||||
// If an extent has this many refs, pretend it does not exist
|
||||
// to avoid a crippling btrfs performance bug
|
||||
// The actual limit in LOGICAL_INO seems to be 2730, but let's leave a little headroom
|
||||
const size_t BEES_MAX_EXTENT_REF_COUNT = 2560;
|
||||
|
||||
// Flags
|
||||
const int FLAGS_OPEN_COMMON = O_NOFOLLOW | O_NONBLOCK | O_CLOEXEC | O_NOATIME | O_LARGEFILE | O_NOCTTY;
|
||||
const int FLAGS_OPEN_DIR = FLAGS_OPEN_COMMON | O_RDONLY | O_DIRECTORY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user