Skip to content

Commit a2b3e1e

Browse files
author
Zygo Blaxell
committed
log: demote a lot of BEESLOGWARN to higher verbosity levels
Toxic extent workarounds are going away because the underlying kernel bugs have been fixed. They are no longer worthy of spamming non-developer logs. INO_PATHS can return no paths if an inode has been deleted. It doesn't need a log message at all, much less one at WARN level. Dedupe failure can be INFO, the same level as dedupe itself, especially since the "NO dedupe" message doesn't mention what was [not] deduped. Inspired by Kai Krakow's "context: demote "abandoned toxic match" to debug log level". Signed-off-by: Zygo Blaxell <[email protected]>
1 parent aaec931 commit a2b3e1e

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/bees-context.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ BeesContext::dedup(const BeesRangePair &brp_in)
259259
BEESCOUNTADD(dedup_bytes, brp.first.size());
260260
} else {
261261
BEESCOUNT(dedup_miss);
262-
BEESLOGWARN("NO Dedup! " << brp);
262+
BEESLOGINFO("NO Dedup! " << brp);
263263
}
264264

265265
lock.reset();
@@ -373,7 +373,7 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
373373
Extent::OBSCURED | Extent::PREALLOC
374374
)) {
375375
BEESCOUNT(scan_interesting);
376-
BEESLOGWARN("Interesting extent flags " << e << " from fd " << name_fd(bfr.fd()));
376+
BEESLOGINFO("Interesting extent flags " << e << " from fd " << name_fd(bfr.fd()));
377377
}
378378

379379
if (e.flags() & Extent::HOLE) {
@@ -556,7 +556,7 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
556556
BeesResolver resolved(m_ctx, found_addr);
557557
// Toxic extents are really toxic
558558
if (resolved.is_toxic()) {
559-
BEESLOGWARN("WORKAROUND: discovered toxic match at found_addr " << found_addr << " matching bbd " << bbd);
559+
BEESLOGDEBUG("WORKAROUND: discovered toxic match at found_addr " << found_addr << " matching bbd " << bbd);
560560
BEESCOUNT(scan_toxic_match);
561561
// Make sure we never see this hash again.
562562
// It has become toxic since it was inserted into the hash table.
@@ -917,7 +917,7 @@ BeesContext::scan_forward(const BeesFileRange &bfr_in)
917917

918918
// Sanity check
919919
if (bfr.begin() >= bfr.file_size()) {
920-
BEESLOGWARN("past EOF: " << bfr);
920+
BEESLOGDEBUG("past EOF: " << bfr);
921921
BEESCOUNT(scanf_eof);
922922
return false;
923923
}

src/bees-hash.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ BeesHashTable::BeesHashTable(shared_ptr<BeesContext> ctx, string filename, off_t
797797
for (auto fp = madv_flags; fp->value; ++fp) {
798798
BEESTOOLONG("madvise(" << fp->name << ")");
799799
if (madvise(m_byte_ptr, m_size, fp->value)) {
800-
BEESLOGWARN("madvise(..., " << fp->name << "): " << strerror(errno) << " (ignored)");
800+
BEESLOGNOTICE("madvise(..., " << fp->name << "): " << strerror(errno) << " (ignored)");
801801
}
802802
}
803803

src/bees-roots.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,7 @@ BeesRoots::open_root_ino_nocache(uint64_t root, uint64_t ino)
19901990
BEESTRACE("searching paths for root " << root << " ino " << ino);
19911991
Fd rv;
19921992
if (ipa.m_paths.empty()) {
1993-
BEESLOGWARN("No paths for root " << root << " ino " << ino);
1993+
// BEESLOGDEBUG("No paths for root " << root << " ino " << ino);
19941994
BEESCOUNT(open_lookup_empty);
19951995
}
19961996
BEESCOUNT(open_lookup_ok);
@@ -2066,7 +2066,7 @@ BeesRoots::open_root_ino_nocache(uint64_t root, uint64_t ino)
20662066

20672067
int attr = ioctl_iflags_get(rv);
20682068
if (attr & FS_NOCOW_FL) {
2069-
BEESLOGWARN("Opening " << name_fd(rv) << " found FS_NOCOW_FL flag in " << to_hex(attr));
2069+
BEESLOGINFO("Opening " << name_fd(rv) << " found FS_NOCOW_FL flag in " << to_hex(attr));
20702070
rv = Fd();
20712071
BEESCOUNT(open_wrong_flags);
20722072
break;

src/bees-types.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
457457
}
458458
}
459459
if (found_toxic) {
460-
BEESLOGWARN("WORKAROUND: found toxic hash in " << first_bbd << " while extending backward:\n" << *this);
460+
BEESLOGDEBUG("WORKAROUND: found toxic hash in " << first_bbd << " while extending backward:\n" << *this);
461461
BEESCOUNT(pairbackward_toxic_hash);
462462
break;
463463
}
@@ -558,7 +558,7 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
558558
}
559559
}
560560
if (found_toxic) {
561-
BEESLOGWARN("WORKAROUND: found toxic hash in " << first_bbd << " while extending forward:\n" << *this);
561+
BEESLOGDEBUG("WORKAROUND: found toxic hash in " << first_bbd << " while extending forward:\n" << *this);
562562
BEESCOUNT(pairforward_toxic_hash);
563563
break;
564564
}

src/bees.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ BeesTooLong::check() const
198198
if (age() > m_limit) {
199199
ostringstream oss;
200200
m_func(oss);
201-
BEESLOGWARN("PERFORMANCE: " << *this << " sec: " << oss.str());
201+
BEESLOGINFO("PERFORMANCE: " << *this << " sec: " << oss.str());
202202
}
203203
}
204204

0 commit comments

Comments
 (0)