From a0a24bc84f7c630838a04a5f49dad68c73f9a2aa Mon Sep 17 00:00:00 2001 From: Peter Seebach Date: Fri, 3 Oct 2014 00:04:54 +0000 Subject: pseudo.c: Suppress probably-spurious diagnostics It turns out that, in the fairly common case where the did-unlink stuff has saved us from worse problems, pseudo produces probably-spurious error messages about the path mismatch when the did-unlink shows up. Change that into a debug message. Also fix a typo in a comment. --- ChangeLog.txt | 1 + pseudo.c | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 99fc976..8d7ea9a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,6 @@ 2014-10-02: * (seebs) use sqlite3_bind_int64 for inodes. + * (seebs) suppress path mismatch warnings for did_unlink. 2014-07-18: * (seebs) Make "server already offline" message into a debugging diff --git a/pseudo.c b/pseudo.c index 8d00b38..b669b4a 100644 --- a/pseudo.c +++ b/pseudo.c @@ -520,7 +520,7 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon break; } - /* Process rename path seperation, there are two paths old / new + /* Process rename path separation, there are two paths old / new * stuff into a rename, break them apart (null seperated) */ @@ -711,13 +711,22 @@ 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.deleting); } else { - pseudo_diag("path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n", - msg->nlink, - msg->nlink == 1 ? "" : "s", - (unsigned long long) msg_header.ino, - path_by_ino ? path_by_ino : "no path", - msg->path); + if (msg->op != OP_DID_UNLINK) { + pseudo_diag("path mismatch [%d link%s]: ino %llu db '%s' req '%s'.\n", + msg->nlink, + msg->nlink == 1 ? "" : "s", + (unsigned long long) msg_header.ino, + path_by_ino ? path_by_ino : "no path", + msg->path); + } else { + pseudo_debug(PDBGF_FILE, "path mismatch on did-unlink [%d link%s]: ino %llu db '%s' req '%s'.\n", + msg->nlink, + msg->nlink == 1 ? "" : "s", + (unsigned long long) msg_header.ino, + path_by_ino ? path_by_ino : "no path", + msg->path); } + } } } else { /* I don't think I've ever seen this one. */ -- cgit