Use swapfs #16
Loading…
Reference in a new issue
No description provided.
Delete branch "swap"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This breaks compatibility with previous disk layout, and there is no upgrade path /o\
The swapfs could very well be used for downloads of files with a known size - it happens that the download is interrupted or the checksum is incorrect. In that case, we then have a file in the tar filesystem that is attempted deleted, and with lots of concurrent download jobs that means it is tomb stoned as
/to-delete/blablah
/o\ so I may do that at some point.I added some commits... This includes: always use swapfs (even for fixed size downloads).
There's also more detailed error reporting.
And a TODO, would be nice to have a "set_stream" in Tar so we can avoid a temporary filename (and always ensure that we only write good data to the tar) -- but due to potential disk failures, we need to have a path to skip/remove broken data anyways.
With this PR, even when using a parallel_download of 1, and exiting the unikernel after the first 14 downloads, I get only a few correct checksums:
I'm lost where the issue is... since the "write to tar" should only happen when the checksum is correct -- so maybe the swapfs is confused / has somewhere an issue?
As mentioned, this is with a single parallel download (which doesn't prevent that there can be multiple handles used at the swap at the same time).
Further debugging, the sha256 that we read out of swap is not the same that we write into it.
Doing some printf debugging in swap shows that the
handle.blocks
is only 0. And also the allocations / frees are sequential. So, I guess the append or read_partial has some minor issue (but can't focus anymore).Disregard my last comment, there's (at least) some issue in our http client(s):
Nice! Thank you for your investigation and nice work. To me the code is now simpler and seem more robust (with the http-mirage-client behavior change).
with the http-mirage-client 0.0.8 that is fixed, this PR results in very nice archives where their checksums match \o/
From my perspective, this is ready to merge. It may be worth to cut a mirage-swapf release first. It may as well be worth to investigate log messages and condense them (now that we have a status page).
as discussed with reynir, let's merge. :)