Skip to content
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
wants to merge 43 commits into from
Closed

[DNM] librbd: integrate journaling support #5278

wants to merge 43 commits into from

Conversation

dillaman
Copy link

Pending Items

  • journal RBD maintenance operations (resize, snapshots, etc) -- handled in another branch
  • dedicated rbd CLI options for creating/attaching/detaching/delete journals
  • new config options to tweak journal settings

Jason Dillaman added 20 commits August 31, 2015 22:18
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>
Jason Dillaman added 22 commits August 31, 2015 22:18
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>
@dillaman
Copy link
Author

Moved source branch to personal repo --- closing this PR in favor of new PR #6541

@dillaman dillaman closed this Nov 11, 2015
@dillaman dillaman deleted the wip-11287 branch November 18, 2015 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants