Repository navigation
uucore: share replace_link's atomic replace - #15122
abendrothj wants to merge 1 commit into
Conversation
Merging this PR will improve performance by 6.02%1 warning, 1 note
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
c7045d6 to
b872c65
Compare
b872c65 to
5d10e9b
Compare
5d10e9b to
f5b87ae
Compare
|
@abendrothj please rebase for a clean history |
f5b87ae to
8c7924c
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Rebased onto main and squashed into one commit. |
8c7924c to
94af8e7
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Move the temporary name and renameat logic of replace_link into DirFd::replace_entry_at, which creates the entry through a callback relative to the directory, so other callers can replace entries the same way. The parent is now opened with DirFd::open_anchor, so ln -sf and cp -sf replacing an entry in a directory with write and search but no read permission work, as they do with GNU, instead of failing with EACCES.
94af8e7 to
4d02b5c
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
replace_linkcreates a temporary link and renames it over the target. The temporary-name andrenameatpart moves intoDirFd::replace_entry_at, which creates the entry through a callback relative to the directory, so mv can replace special files and directory entries the same way.The parent is now opened with
DirFd::open_anchor, soln -sfandcp -sfreplacing an entry in a directory with write and search but no read permission work, as with GNU 9.12, instead of failing with EACCES. Running out of temporary names reports a translated error.Closes #15112