| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, don't allow children to set nref (to 0). This is the more significant
change as it required fixing various code to not do this:
<reftype> ptr = new RefCountedObjectFoo(..., 0);
as a way to create a starting reference with nref==1. This is a pretty
bad code smell so I've converted all the code doing this to use the new
factory method which produces the reference safely:
auto ptr = ceph::make_ref<RefCountedObjectFoo>(...);
libradosstriper was particularly egregious in its abuse of setting the starting
nref. :(
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
|
| |
The main motivation for this change is to avoid copies due to the use of
boost::function/std::function where captures of std::unique_ptr (in
subsequent commits) would fail to compile.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
|
|
|
|
|
|
|
|
|
| |
25a23364 was supposed to fix this race, but it was not enough:
there was still a window between `prefetch` is queued for
execution in handle_cache_rebalanced and is actually executed,
during which shut_down can be called and completed.
Signed-off-by: Mykola Golub <mgolub@suse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* FutureImpl::m_lock is an exception. as, before this change, the lock
was initialized like `m_lock("FutureImpl::m_lock", false, false)`, see
the declaration of
`Mutex(const std::string &n, bool r = false, bool ld=true, bool bt=false)`
so `m_lock` is actually not using the extra features offered by
`Mutex` like runtime lockdeps check. and `mutex_debugging_base` does
not allow us to disable lockdeps individually. but it does use the `is_locked()`
method. so instead of using `ceph::mutex` directly, a cutomized
`ceph::mutex` is added for `CEPH_DEBUG_MUTEX` build.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Mykola Golub <mgolub@suse.com>
|
|
|
|
|
|
| |
(if a cache manager is specified)
Signed-off-by: Mykola Golub <mgolub@suse.com>
|
|
|
|
| |
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
| |
Signed-off-by: Shengjing Zhu <i@zhsj.me>
|
|
|
|
| |
Signed-off-by: Li Wang <laurence.liwang@gmail.com>
|
|
|
|
| |
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
|
|
|
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/18922
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
|
|
|
|
|
|
|
| |
When streaming playback, avoid the unnecessary watch delay when
one or more entries have been pruned.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
rbd-mirror debugging involved potentially thousands of journals
concurrently running. The instance address will correlate log
messages between journals.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
Now that it's possible for the ObjectPlayer to only read a
partial subset of available entries, the JournalPlayer needs
to detect that more entries might be available.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
Previously it was prefetching up to 2 object sets worth of journal
data objects which consumed too much memory.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
Support fetching the full object or incremental chunks (with a
minimum of at least a single decoded entry if available).
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/15949
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The randomized write sizes of the modified rbd-mirror stress
test results in a lot of journal object with few entries.
Immediately fetch objects when performing a refetch check prior
to closing an empty object.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
It's possible that there might be additional entries to prune in
objects that haven't been prefetched yet. Keep the active tag
to allow these entries to be pruned after they have been loaded.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Clear the refetch required flag while scheduling the watch
and remove the stale object after the watch completes if still
empty. Previously, it was possible for the flag to become
out-of-sync with whether or not it was actually refreshed
and pruned.
Fixes: http://tracker.ceph.com/issues/15993
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|\
| |
| |
| |
| | |
librbd: write-after-write might result in an inconsistent replicated image
Reviewed-by: Mykola Golub <mgolub@mirantis.com>
|
| |
| |
| |
| | |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|/
|
|
| |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
| |
If a journal client does not fully write out its buffered entries
before quiting, replay should skip over all remaining out-of-
sequence entries for the tag.
Fixes: http://tracker.ceph.com/issues/15864
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
During a live replay, it's possible that an append and and overflow
into the next object could race with the live playback of the same
object. Re-fetch an "empty" object at least once before advancing
to next set to ensure all records have been read.
Fixes: http://tracker.ceph.com/issues/15665
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|\
| |
| |
| |
| | |
replayReviewed-by: Josh Durgin <jdurgin@redhat.com>
librbd: potential concurrent event processing during journal replay
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
One such example is popping the last entry from an object. The next
object will be automatically prefetched. When that object is received,
we do not want to alert the user that entries are available since
try_pop_front already indicated more records were available.
Fixes: http://tracker.ceph.com/issues/15755
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|/
|
|
| |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
The context associated with a scheduled watch might be freed
by two ObjectPlayers.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
| |
When two objects are being actively watched, it was possible for
the watch context to complete before the second watch was
associated.
Fixes: http://tracker.ceph.com/issues/15352
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
If a live replay is in progress, it's possible that object offset 0
was pulled and a new tag is discovered before the current object is
(re-)pulled to determine that the old tag still has entries remaining.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
| |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
journal: re-use common threads between journalers
Conflicts:
src/journal/JournalPlayer.cc
src/librbd/Journal.cc
src/test/rbd_mirror/image_replay.cc
src/tools/rbd_mirror/ImageReplayer.h
src/tools/rbd_mirror/Mirror.cc
(merged interface changes to ImageReplayer, and reduced scope for
change to JournalPlayer due to pr #7884 (wip-14663)).
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
|
| |
| |
| |
| |
| |
| | |
This avoids the need to open two threads per journaler.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|/
|
|
|
|
|
|
|
| |
Now that the tag concept has been re-used for delineating epochs for
librbd, we need playback to properly handle the cases where the active
playback tag abruptly ends and a newer tag is inserted in the first
splay offset object.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
| |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
It's possible, when delaying appends to the journal, that the
current commit position might be in object set X while future
events for a different offset might be in an object set < X.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
| |
librbd should treat the corruption of the journal differently from
missing journal entries. If entries are missing, it might be the
result of a crash and the journal should just be replayed through
the most recent, consistent entry.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
Later commits will add the ability to allocate tags and
associate them with registered clients.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
Use explicit keyword for constructors with one argument to
prevent implicit usage as conversion functions.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
|
|
|
|
|
| |
Fixes: #13924
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
| |
It's possible for a splay object within a set to be skipped
if the set is closed due to a full object within the set.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
| |
Otherwise, if on image open, there are no any uncommitted entries in
journal, allocated tid is not updated to the latest commited and
recording always starts from tid=0.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
|
|
|
|
| |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Now the journal player and recorder will allocate a tid to represent
the associated journal entry. The order of these allocations are
tracked so that the commit position can be moved only when all prior
commits are safely on disk.
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>
|