-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
os/bluestore: use block_size for bitmap granularity #10999
Closed
Closed
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
Our transaction writes are labeled with a seq and uuid to avoid replaying over garbage. Two bugs, one real, one potential. 1) The second async compaction transactoin didn't have its seq and uuid set, so replay always stopped. 2) We were writing two separate transactions, one with all the new metadata, and the next one with a jump to the new log offset. If the first write completed but it was torn and the second transaction didn't hit disk, we might see an old transaction with seq == 2 and the same uuid and replay that instead. Fix both of these by making the async log txn one single transaction that jumps directly to the new log offset. Signed-off-by: Sage Weil <sage@redhat.com>
(they use + instead of ~) Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Rewrote much of the persistence of onode metadata. The highlights: - extents and blobs stored together (the blob with the first referencing extent). - extents sharded across multiple k/v keys - if a blob if referenced from multiple blobs, it's stored in the onode key (called a "spanning blob"). - when we clone a blob we copy the metadata, but mark it shared and put (just) the ref_map on the underlying blocks in a shared_blob key. at this point we also assign a globally unique id (sbid = shared blob id) so the key has a unique name. - we instantiate a SharedBlob in memory regardless of whether we need to load the ref_map (which is only needed for deallocations!). the BufferSpace is attached to this SharedBlob so we get unified caching across clones. Signed-off-by: Sage Weil <sage@redhat.com>
We could bump the _max value for a TransContext in it's prepare state, have it wait for a long time on IO, and let another txc allocate and commit something with an id higher than the previous max. Fix this first by pushing the max ids into the TransContext where we can deal with them at commit time, and then making _kv_sync_thread bump the committed max in a safe way. Note that this will need to change if/when we do these commits in parallel. Signed-off-by: Sage Weil <sage@redhat.com>
Only examine the range we just wrote to (and to the left and right). Signed-off-by: Sage Weil <sage@redhat.com>
This has to be block_size bits because min_alloc_size can vary over mounts. Signed-off-by: Sage Weil <sage@redhat.com>
We need to handle objects written during previous mounts that may have had a smaller min_alloc_size. Use block_size, which is a safe lower bound. Signed-off-by: Sage Weil <sage@redhat.com>
These were taking min_alloc_size, but this can change across mounts; better to use the logical blob length instead (that's what we want anyway!). Signed-off-by: Sage Weil <sage@redhat.com>
eh, rolled this into #10963 so i can run test. it's all passing there now. |
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.
No description provided.