]> git.hungrycats.org Git - bees/commitdiff
log: demote a lot of BEESLOGWARN to higher verbosity levels
authorZygo Blaxell <bees@furryterror.org>
Sun, 19 Jan 2025 06:02:53 +0000 (01:02 -0500)
committerZygo Blaxell <bees@furryterror.org>
Sun, 19 Jan 2025 06:08:28 +0000 (01:08 -0500)
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 <bees@furryterror.org>
src/bees-context.cc
src/bees-hash.cc
src/bees-roots.cc
src/bees-types.cc
src/bees.cc

index 1f1ed7e9336cb4592da4d63ace882c78f0f28a1d..7602e21f17d1f4451a278b45c78a1e7bcefdc11e 100644 (file)
@@ -259,7 +259,7 @@ BeesContext::dedup(const BeesRangePair &brp_in)
                                BEESCOUNTADD(dedup_bytes, brp.first.size());
                        } else {
                                BEESCOUNT(dedup_miss);
-                               BEESLOGWARN("NO Dedup! " << brp);
+                               BEESLOGINFO("NO Dedup! " << brp);
                        }
 
                        lock.reset();
@@ -373,7 +373,7 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
                Extent::OBSCURED | Extent::PREALLOC
        )) {
                BEESCOUNT(scan_interesting);
-               BEESLOGWARN("Interesting extent flags " << e << " from fd " << name_fd(bfr.fd()));
+               BEESLOGINFO("Interesting extent flags " << e << " from fd " << name_fd(bfr.fd()));
        }
 
        if (e.flags() & Extent::HOLE) {
@@ -556,7 +556,7 @@ BeesContext::scan_one_extent(const BeesFileRange &bfr, const Extent &e)
                        BeesResolver resolved(m_ctx, found_addr);
                        // Toxic extents are really toxic
                        if (resolved.is_toxic()) {
-                               BEESLOGWARN("WORKAROUND: discovered toxic match at found_addr " << found_addr << " matching bbd " << bbd);
+                               BEESLOGDEBUG("WORKAROUND: discovered toxic match at found_addr " << found_addr << " matching bbd " << bbd);
                                BEESCOUNT(scan_toxic_match);
                                // Make sure we never see this hash again.
                                // It has become toxic since it was inserted into the hash table.
@@ -917,7 +917,7 @@ BeesContext::scan_forward(const BeesFileRange &bfr_in)
 
        // Sanity check
        if (bfr.begin() >= bfr.file_size()) {
-               BEESLOGWARN("past EOF: " << bfr);
+               BEESLOGDEBUG("past EOF: " << bfr);
                BEESCOUNT(scanf_eof);
                return false;
        }
index 91b669d39918098787b4a921d6722d517b576153..ab177377930c103e93859fc26483502a8032dfac 100644 (file)
@@ -797,7 +797,7 @@ BeesHashTable::BeesHashTable(shared_ptr<BeesContext> ctx, string filename, off_t
        for (auto fp = madv_flags; fp->value; ++fp) {
                BEESTOOLONG("madvise(" << fp->name << ")");
                if (madvise(m_byte_ptr, m_size, fp->value)) {
-                       BEESLOGWARN("madvise(..., " << fp->name << "): " << strerror(errno) << " (ignored)");
+                       BEESLOGNOTICE("madvise(..., " << fp->name << "): " << strerror(errno) << " (ignored)");
                }
        }
 
index 15a6ce8f53afa56037dad35a43b12ee3a161a71e..0c2dfb0d82a455f5ef105c9138491e10724fbdee 100644 (file)
@@ -1990,7 +1990,7 @@ BeesRoots::open_root_ino_nocache(uint64_t root, uint64_t ino)
        BEESTRACE("searching paths for root " << root << " ino " << ino);
        Fd rv;
        if (ipa.m_paths.empty()) {
-               BEESLOGWARN("No paths for root " << root << " ino " << ino);
+               // BEESLOGDEBUG("No paths for root " << root << " ino " << ino);
                BEESCOUNT(open_lookup_empty);
        }
        BEESCOUNT(open_lookup_ok);
@@ -2066,7 +2066,7 @@ BeesRoots::open_root_ino_nocache(uint64_t root, uint64_t ino)
 
                int attr = ioctl_iflags_get(rv);
                if (attr & FS_NOCOW_FL) {
-                       BEESLOGWARN("Opening " << name_fd(rv) << " found FS_NOCOW_FL flag in " << to_hex(attr));
+                       BEESLOGINFO("Opening " << name_fd(rv) << " found FS_NOCOW_FL flag in " << to_hex(attr));
                        rv = Fd();
                        BEESCOUNT(open_wrong_flags);
                        break;
index bd89c4b78512a183fe56150e5e6b1f989f37a348..3ee21d38ea578e1f6fa4a6a22b0d04b3c0fe90db 100644 (file)
@@ -457,7 +457,7 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
                        }
                }
                if (found_toxic) {
-                       BEESLOGWARN("WORKAROUND: found toxic hash in " << first_bbd << " while extending backward:\n" << *this);
+                       BEESLOGDEBUG("WORKAROUND: found toxic hash in " << first_bbd << " while extending backward:\n" << *this);
                        BEESCOUNT(pairbackward_toxic_hash);
                        break;
                }
@@ -558,7 +558,7 @@ BeesRangePair::grow(shared_ptr<BeesContext> ctx, bool constrained)
                        }
                }
                if (found_toxic) {
-                       BEESLOGWARN("WORKAROUND: found toxic hash in " << first_bbd << " while extending forward:\n" << *this);
+                       BEESLOGDEBUG("WORKAROUND: found toxic hash in " << first_bbd << " while extending forward:\n" << *this);
                        BEESCOUNT(pairforward_toxic_hash);
                        break;
                }
index ffcd6c87c0276f75d573df95bc5687b89ca2c7e4..95e2b47eb66e8b8e4d4bfa09ecf20be62ac944f2 100644 (file)
@@ -198,7 +198,7 @@ BeesTooLong::check() const
        if (age() > m_limit) {
                ostringstream oss;
                m_func(oss);
-               BEESLOGWARN("PERFORMANCE: " << *this << " sec: " << oss.str());
+               BEESLOGINFO("PERFORMANCE: " << *this << " sec: " << oss.str());
        }
 }