mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
BeesRangePair: drop the _really_ expensive toxic extent workaround
We were doing a `LOGICAL_INO` ioctl on every _block_ of a matching extent, just to see how long it takes. It takes a while! This could be modified to do an ioctl with the `IGNORE_OFFSET` flag, once per new extent, but the kernel bug was fixed a long time ago, so we can start removing all the toxic extent code. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
0b974b5485
commit
8f92b1dacc
@ -406,17 +406,6 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
|
||||
break;
|
||||
}
|
||||
|
||||
// Source extent cannot be toxic
|
||||
BeesAddress first_addr(first.fd(), new_first.begin());
|
||||
if (!first_addr.is_magic()) {
|
||||
auto first_resolved = ctx->resolve_addr(first_addr);
|
||||
if (first_resolved.is_toxic()) {
|
||||
BEESLOGWARN("WORKAROUND: not growing matching pair backward because src addr is toxic:\n" << *this);
|
||||
BEESCOUNT(pairbackward_toxic_addr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Extend second range. If we hit BOF we can go no further.
|
||||
BeesFileRange new_second = second;
|
||||
BEESTRACE("new_second = " << new_second);
|
||||
@ -452,6 +441,7 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
|
||||
}
|
||||
|
||||
// Source block cannot be zero in a non-compressed non-magic extent
|
||||
BeesAddress first_addr(first.fd(), new_first.begin());
|
||||
if (first_bbd.is_data_zero() && !first_addr.is_magic() && !first_addr.is_compressed()) {
|
||||
BEESCOUNT(pairbackward_zero);
|
||||
break;
|
||||
@ -509,17 +499,6 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
|
||||
break;
|
||||
}
|
||||
|
||||
// Source extent cannot be toxic
|
||||
BeesAddress first_addr(first.fd(), new_first.begin());
|
||||
if (!first_addr.is_magic()) {
|
||||
auto first_resolved = ctx->resolve_addr(first_addr);
|
||||
if (first_resolved.is_toxic()) {
|
||||
BEESLOGWARN("WORKAROUND: not growing matching pair forward because src is toxic:\n" << *this);
|
||||
BEESCOUNT(pairforward_toxic);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Extend second range. If we hit EOF we can go no further.
|
||||
BeesFileRange new_second = second;
|
||||
BEESTRACE("new_second = " << new_second);
|
||||
@ -563,6 +542,7 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
|
||||
}
|
||||
|
||||
// Source block cannot be zero in a non-compressed non-magic extent
|
||||
BeesAddress first_addr(first.fd(), new_first.begin());
|
||||
if (first_bbd.is_data_zero() && !first_addr.is_magic() && !first_addr.is_compressed()) {
|
||||
BEESCOUNT(pairforward_zero);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user