Codebase list pseudo / ed20f83
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. Seebs 5 years ago
2 changed file(s) with 7 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
0 2019-04-09:
1 * (seebs) Partial fix for db corruption issue.
2
03 2018-12-15:
14 * (seebs) Import IPC patch from Rasmus Villemoes.
25 * (seebs) Import (another) IPC patch from Rasmus Villemoes.
629629 pseudo_diag("dir mismatch: '%s' [%llu] db mode 0%o, header mode 0%o (unlinking db)\n",
630630 msg->path, (unsigned long long) by_path.ino,
631631 (int) by_path.mode, (int) msg_header.mode);
632 /* unlink everything with this inode */
633 pdb_unlink_file_dev(&by_path);
632 /* unlink this path -- the inode may be in use elsewhere */
633 pdb_unlink_file(msg);
634634 found_path = 0;
635635 } else if (S_ISLNK(by_path.mode) != S_ISLNK(msg_header.mode)) {
636636 pseudo_diag("symlink mismatch: '%s' [%llu] db mode 0%o, header mode 0%o (unlinking db)\n",
637637 msg->path, (unsigned long long) by_path.ino,
638638 (int) by_path.mode, (int) msg_header.mode);
639 /* unlink everything with this inode */
640 pdb_unlink_file_dev(&by_path);
639 /* unlink this path -- the inode may be in use elsewhere */
640 pdb_unlink_file(msg);
641641 found_path = 0;
642642 }
643643 if (trailing_slash && !S_ISDIR(by_path.mode)) {