Repository navigation
Commit 1860bb1
fix(filesystem): keep a source written to in place during a cross-device move
Review round 3 on #5322: the source's device and inode still match after
another writer edits it in place, so the move would delete the edited
source while the destination held the content read before the edit.
Before the source is removed, its size, mtime and ctime (ns) must also
match the stat taken when it was opened; otherwise the copy is removed
and the source kept.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>1 parent 790d7cd commit 1860bb1
2 files changed
Lines changed: 43 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
703 | 726 | | |
704 | 727 | | |
705 | 728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
405 | 409 | | |
406 | 410 | | |
407 | | - | |
| 411 | + | |
| 412 | + | |
408 | 413 | | |
409 | 414 | | |
410 | 415 | | |
411 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
412 | 429 | | |
413 | 430 | | |
414 | 431 | | |
| |||
498 | 515 | | |
499 | 516 | | |
500 | 517 | | |
501 | | - | |
| 518 | + | |
502 | 519 | | |
503 | 520 | | |
504 | 521 | | |
| |||
0 commit comments