aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2014-10-03 00:04:54 +0000
committerPeter Seebach <peter.seebach@windriver.com>2014-10-03 00:06:02 +0000
commita0a24bc84f7c630838a04a5f49dad68c73f9a2aa (patch)
tree8286f297ae26cf5d4b5c32deaa8305f9941d6446
parente99b0316aa1620eff13cf1fc10928b70cee9b784 (diff)
downloadpseudo-a0a24bc84f7c630838a04a5f49dad68c73f9a2aa.tar.gz
pseudo-a0a24bc84f7c630838a04a5f49dad68c73f9a2aa.tar.bz2
pseudo-a0a24bc84f7c630838a04a5f49dad68c73f9a2aa.zip
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.
-rw-r--r--ChangeLog.txt1
-rw-r--r--pseudo.c23
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. */