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
|
0 |
2019-04-09:
|
|
1 |
* (seebs) Partial fix for db corruption issue.
|
|
2 |
|
0 | 3 |
2018-12-15:
|
1 | 4 |
* (seebs) Import IPC patch from Rasmus Villemoes.
|
2 | 5 |
* (seebs) Import (another) IPC patch from Rasmus Villemoes.
|
629 | 629 |
pseudo_diag("dir mismatch: '%s' [%llu] db mode 0%o, header mode 0%o (unlinking db)\n",
|
630 | 630 |
msg->path, (unsigned long long) by_path.ino,
|
631 | 631 |
(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);
|
634 | 634 |
found_path = 0;
|
635 | 635 |
} else if (S_ISLNK(by_path.mode) != S_ISLNK(msg_header.mode)) {
|
636 | 636 |
pseudo_diag("symlink mismatch: '%s' [%llu] db mode 0%o, header mode 0%o (unlinking db)\n",
|
637 | 637 |
msg->path, (unsigned long long) by_path.ino,
|
638 | 638 |
(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);
|
641 | 641 |
found_path = 0;
|
642 | 642 |
}
|
643 | 643 |
if (trailing_slash && !S_ISDIR(by_path.mode)) {
|