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
[DNM] librbd: integrate journaling support #5278
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
When enabled, all mutable operations against an RBD image will be recorded to a journal prior to changing the underlying RBD image. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This context is used for more than just write requests. It is always tied to an AioCompletion, so moved request reference counting management within class. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Removed the dependency on WorkQueueVal to remove some of the heavy-weight management. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This better reflects the fact that these represent requests against an object extent and helps differentiate it from the future AioImageRequest classes. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
New work queue has the ability to suspend write operations, which should occur when exclusive locking is enabled and the client doesn't own the lock. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Move aio_read/write/discard/flush to new AioImageRequest classes in support of a unified aio queue / journaling. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The ImageCtx is known so there is no need to pass it with each function call. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Required moving non-AIO read/write/discard methods to AioImageRequestWQ to avoid deadlock on lock request. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Previously the ImageWatcher stored delayed ops that were waiting on the image exclusive lock. This management has been moved to the AioImageRequestWQ to ensure requests are processed in-order. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
ImageWatcher is no longer responsible for queueing write ops while waiting for the exclusive lock. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
New journal entries to cover AIO write/discard/flush operations. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
It's possible for AIO ops to cause an image refresh, which will attempt to flush the ops. Since the op_work_queue shares a thread with the aio_work_queue, the AIO op will deadlock waiting for the flush. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
With multiple concurrent AIO requests, it's possible for multiple image refreshes to be scheduled. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Rough draft of journal library integration within librbd. Non-cached IO paths are now recorded to the journal. Incoming IO ops are blocked if the exclusive lock isn't held or if the journal hasn't been replayed. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Writebacks from the journal will provide the associated journal commit tid so that writebacks can be delayed until after the journal entry is safe on disk. This allows asynchronously submitting an event to the journal and submitting the write operation to the ObjectCacher. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Cache writeback should be delayed until after journal event has been commmitted to disk. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When caching is disabled, the AioCompletion notifies the journal that the update is safe. When caching is enabled, writeback can result in partial write extents being overwritten (and no longer associated to the original journal event). In this case, the writeback handler is responsible for informing the journal when writes are safe. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Valgrind-related updates to the journal library required tweaks to current implementation of librbd journaling. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This will ensure that the journal is properly opened to handle appending events. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Moved source branch to personal repo --- closing this PR in favor of new PR #6541 |
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.
Pending Items
rbd
CLI options for creating/attaching/detaching/delete journals