-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore and Check. #191
Open
aversecat
wants to merge
21
commits into
main
Choose a base branch
from
auke/restore_and_check
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Restore and Check. #191
Conversation
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
aversecat
force-pushed
the
auke/restore_and_check
branch
from
October 17, 2024 20:37
67bbd3c
to
ae4b55a
Compare
Signed-off-by: Zach Brown <[email protected]> Signed-off-by: Auke Kok <[email protected]>
As I was committing the initial check command I had only partially completed a rename of the function that checks the metadata allocators. Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Add test_bit() to the trivial utils bitmap.c implementation. Signed-off-by: Zach Brown <[email protected]>
Generally as we call block_get() we should validate that if the block has a hdr, at a minimum the crc is correct and the magic value is the expected value passed, and the fsid matches the superblock. This function implements just that. Returns -EINVAL, up to the caller to report a problem() and handle the outcome. For now the code just hard fails, which incedentally makes it fail the clobber-repair.sh tests I wrote. Signed-off-by: Auke Kok <[email protected]>
Adds basic man page content for the `check` subcommand. Signed-off-by: Auke Kok <[email protected]>
aversecat
force-pushed
the
auke/restore_and_check
branch
from
December 17, 2024 18:09
ae4b55a
to
a2364f2
Compare
We check superblock magic, crc, flags. data device superblock is checked but a little less thorough. We check whether the device is still mounted, since that would make checking invalid to begin with. Quorum blocks are validated to have sane contents. We add a global problem counter so we can trivially measure and report whether any problem was found at all, instead of iterating over all the problems and checking each individual count. We pick the standard exit code values from `fsck` and mirror their intentional behavior. This results in `fsck.scoutfs` can now be trivially created by making it a wrapper around `scoutfs check`. Signed-off-by: Auke Kok <[email protected]> Signed-off-by: Hunter Shaffer <[email protected]>
Import the kernel's rbtree implementation with a wrapper so we can use it from userspace. Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Zach Brown <[email protected]> Signed-off-by: Hunter Shaffer <[email protected]> Signed-off-by: Auke Kok <[email protected]>
This is the benchmark binary that bulk creates filesystem items, xattrs and is heavily threaded to scope the performance of the library. The test script invokes it to validate some basic constraints. Signed-off-by: Zach Brown <[email protected]> Signed-off-by: Hunter Shaffer <[email protected]> Signed-off-by: Auke Kok <[email protected]>
Import a few more functions from the kernel's list.h into our imported copy. Signed-off-by: Zach Brown <[email protected]>
The list alloc blocks have an array of blknos that are offset by a start field in the block header. The print code wasn't using that and was always referencing the beginning of the array, which could miss blocks. Signed-off-by: Zach Brown <[email protected]>
This tool compies a source tree (whether it's scoutfs or not) into an offline scoutfs meta device. It has only those 2 parameters and does a single-process walk of the tree to restore all items while preservice as much of the metadata as possible. Signed-off-by: Hunter Shaffer <[email protected]> Signed-off-by: Auke Kok <[email protected]>
aversecat
force-pushed
the
auke/restore_and_check
branch
from
December 19, 2024 23:47
a2364f2
to
fac2fec
Compare
pushed el7 fixes into this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch against
main
contains both the parallel restore library, tests, as well as the check code.The check code has been reduced to our validation tool to identify inconsistencies in an umounted scoutfs meta device, only. All error injection and repair code has been omitted. The check code is used to validate the output of the parallel restore test cases.
scoutfs check
or there is an error inserting duringrestore
.