mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
roots: improve "RO root 6094" message
This sequence of log messages isn't clear: crawl_master: WORKAROUND: Avoiding RO subvol 6094 crawl_master: WORKAROUND: RO root 6094 The first is from a cache miss, and appears wherever a root is opened (dedupe or crawl). The second is skipping an entire subvol scan, and only happens in crawl_master. Elaborate on the second message a little. Also use the term "root" consistently when referring to subvol tree IDs. btrfs refers to these objects by (at least) three distinct names: tree, subvol, and root. Using three different words for the same thing is worse than using a single wrong word consistently to refer to the same concept. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
cdca2bcdcd
commit
bf2a014607
@ -193,7 +193,7 @@ BeesContext::dedup(const BeesRangePair &brp)
|
||||
brp.second.fd(shared_from_this());
|
||||
|
||||
if (is_root_ro(brp.second.fid().root())) {
|
||||
// BEESLOGDEBUG("WORKAROUND: dst subvol is read-only in " << name_fd(brp.second.fd()));
|
||||
// BEESLOGDEBUG("WORKAROUND: dst root is read-only in " << name_fd(brp.second.fd()));
|
||||
BEESCOUNT(dedup_workaround_btrfs_send);
|
||||
return false;
|
||||
}
|
||||
|
@ -699,7 +699,7 @@ BeesRoots::is_root_ro_nocache(uint64_t root)
|
||||
uint64_t flags = 0;
|
||||
DIE_IF_NON_ZERO(ioctl(root_fd, BTRFS_IOC_SUBVOL_GETFLAGS, &flags));
|
||||
if (flags & BTRFS_SUBVOL_RDONLY) {
|
||||
BEESLOGDEBUG("WORKAROUND: Avoiding RO subvol " << root);
|
||||
BEESLOGDEBUG("WORKAROUND: Avoiding RO root " << root);
|
||||
BEESCOUNT(root_workaround_btrfs_send);
|
||||
return true;
|
||||
}
|
||||
@ -947,7 +947,7 @@ BeesCrawl::fetch_extents()
|
||||
// is ever switched back to read-write, it won't trigger big
|
||||
// expensive in-kernel searches for ancient transids.
|
||||
if (m_ctx->is_root_ro(old_state.m_root)) {
|
||||
BEESLOGDEBUG("WORKAROUND: RO root " << old_state.m_root);
|
||||
BEESLOGDEBUG("WORKAROUND: skipping scan of RO root " << old_state.m_root);
|
||||
BEESCOUNT(root_workaround_btrfs_send);
|
||||
return next_transid();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user