aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeebs <seebs@seebs.net>2019-04-09 09:10:53 -0500
committerSeebs <seebs@seebs.net>2019-04-09 09:12:21 -0500
commited20f8323a9676e4e2c14bda06aa07fb1a1ba8ae (patch)
tree9a48ef67af560de832d8e4ec4985f6f0ed71bf5d
parent32da65542f1a4430a3ec7a73fa1ec716c8a05a47 (diff)
downloadpseudo-ed20f8323a9676e4e2c14bda06aa07fb1a1ba8ae.tar.gz
pseudo-ed20f8323a9676e4e2c14bda06aa07fb1a1ba8ae.tar.bz2
pseudo-ed20f8323a9676e4e2c14bda06aa07fb1a1ba8ae.zip
partial fix (??) for an ownership corruption problem
We've had really weird sporadic things, but it looks like the underlying problem is that something's getting symlinked over (which is clearly impossible), but we're nuking everything with that inode, rather than just the entry for that path, and this is causing us to drop ownership info for an existing thing.
-rw-r--r--ChangeLog.txt3
-rw-r--r--pseudo.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index e6b1280..168709e 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,6 @@
+2019-04-09:
+ * (seebs) Partial fix for db corruption issue.
+
2018-12-15:
* (seebs) Import IPC patch from Rasmus Villemoes.
* (seebs) Import (another) IPC patch from Rasmus Villemoes.
diff --git a/pseudo.c b/pseudo.c
index c4440ab..ef91407 100644
--- a/pseudo.c
+++ b/pseudo.c
@@ -630,15 +630,15 @@ pseudo_op(pseudo_msg_t *msg, const char *program, const char *tag, char **respon
pseudo_diag("dir mismatch: '%s' [%llu] db mode 0%o, header mode 0%o (unlinking db)\n",
msg->path, (unsigned long long) by_path.ino,
(int) by_path.mode, (int) msg_header.mode);
- /* unlink everything with this inode */
- pdb_unlink_file_dev(&by_path);
+ /* unlink this path -- the inode may be in use elsewhere */
+ pdb_unlink_file(msg);
found_path = 0;
} else if (S_ISLNK(by_path.mode) != S_ISLNK(msg_header.mode)) {
pseudo_diag("symlink mismatch: '%s' [%llu] db mode 0%o, header mode 0%o (unlinking db)\n",
msg->path, (unsigned long long) by_path.ino,
(int) by_path.mode, (int) msg_header.mode);
- /* unlink everything with this inode */
- pdb_unlink_file_dev(&by_path);
+ /* unlink this path -- the inode may be in use elsewhere */
+ pdb_unlink_file(msg);
found_path = 0;
}
if (trailing_slash && !S_ISDIR(by_path.mode)) {