diff options
-rw-r--r-- | ChangeLog.txt | 8 | ||||
-rw-r--r-- | pseudo.c | 6 | ||||
-rw-r--r-- | pseudo.h | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index dee80f3..6d91bb3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,11 @@ +2018-04-13: + * (seebs) Reduce spamminess of path mismatches. + Don't log path mismatches with multiple links unless you've + requested path+verbose debugging. Also allow pseudo_debug + to take a 0 to indicate "always debug", because we want that + message unconditionally, and I don't want near-identical + calls to diag() and debug(). + 2018-04-02: * (seebs) Change default copyright notice in guts to say "Peter Seebach" rather than "Wind River" as I haven't @@ -706,7 +706,11 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon msg->path); pdb_did_unlink_file(path_by_ino, &by_ino, by_ino.deleting); } else { - pseudo_diag("path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n", + int flags = 0; + if (msg->nlink > 1) { + flags = PDBGF_FILE | PDBGF_VERBOSE; + } + pseudo_debug(flags, "path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n", msg->nlink, msg->nlink == 1 ? "" : "s", (unsigned long long) msg_header.ino, @@ -53,7 +53,7 @@ extern void pseudo_evlog_dump(void); if ((x) & PDBGF_VERBOSE) { \ if ((pseudo_util_debug_flags & PDBGF_VERBOSE) && (pseudo_util_debug_flags & ((x) & ~PDBGF_VERBOSE))) { pseudo_diag(__VA_ARGS__); } \ } else { \ - if (pseudo_util_debug_flags & (x)) { pseudo_diag(__VA_ARGS__); } \ + if ((pseudo_util_debug_flags & (x)) || ((x) == 0)) { pseudo_diag(__VA_ARGS__); } \ } \ } while (0) #define pseudo_debug_call(x, fn, ...) do { \ |