-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/pull: Change fetcher to return O_TMPFILE
A lot of the libostree code is honestly too complex for its own good (this is mostly my fault). The way we do HTTP writes is still one of those. The way the fetcher writes tempfiles, then reads them back in is definitely one of those. Now that we've dropped the "partial object" bits in: #1176 i.e. commit 0488b48 we can simplify things a lot more by having the fetcher return an `O_TMPFILE` rather than a filename. For trusted archive mirroring, we need to enable linking in the tmpfiles directly. Otherwise for at least content objects they're compressed, so we couldn't link them in. For metadata, we need to do similar logic to what we have around `mmap()` to only grab a tmpfile if the size is large enough. Closes: #1252 Approved by: jlebon
- Loading branch information
1 parent
7f6af94
commit 2e3889a
Showing
5 changed files
with
86 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.