To get back to the reformatting procedure that otherwise
occurs during MDLog::open, introduce an MDLog::reopen call
that MDS can use in the standbyreplay->standby transition
for the special case where the journal is old.
Fixes: #8869
Signed-off-by: John Spray <john.spray@redhat.com>
* Make boot_start private.
* Define boot stages in enum, replace int with type.
* Merge steps 0 and 1, 0 always fell through to 1.
* starting_done was only ever reached by a fall through
from the previous step, so call it directly from there.
Signed-off-by: John Spray <john.spray@redhat.com>
Refactor to:
* have somewhere to put some logic for doing
background recovery in future.
* trim a few lines from the oversized MDCache.cc
whereever we can.
Signed-off-by: John Spray <john.spray@redhat.com>
A bit of colission from spec changes for the rhel7/ceph-common
changes and alfredo's pull request for wip-die-ceph-mkcephfs.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit 1526546ddc)
A bit of colission from spec changes for the rhel7/ceph-common
changes and alfredo's pull request for wip-die-ceph-mkcephfs.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
This should ensure that we don't hit this limit on all but the very biggest
clusters. We seen it hit on a ~500 OSD dumpling cluster.
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
There were two problems here:
* write_pos was modified through an undump/dump cycle,
because it was probed during recovery.
* stream format was being forgotten.
Signed-off-by: John Spray <john.spray@redhat.com>
Higher the clone probability to 8% and lower the probability of flatten
to 2%. This should give us longer parent chaines (before this we would
usually have one parent and even then only for a few ops time).
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Truncate base images after they have been cloned from to cover more
code paths and make sure that clients look at snapshot parent_overlap
(i.e. parent_overlap of the base image at the time the snapshot was
taken) and not that of the base image (i.e. parent_overlap of the base
image as of now).
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
The C++ version of rbd_get_parent_info() allows passing NULL for parent
image name, image name and snapshot name out parameters. Make C API do
the same both for consistency and to make it easier to check whether
the image at hand has a parent or not.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Currently for pools with different rules, "ceph df" cannot report
right available space for them, respectively. For detail assisment
of the bug ,pls refer to bug report #8943
This patch fix this bug and make ceph df works correctlly.
Fixes Bug #8943
Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
Fix dup bh_write for TX state bh
Tested-by: Sage Weil <sage@redhat.com>
Reviewed-by: Haomai Wang <haomaiwang@gmail.com>
Original changeset
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
The TX state bh should be skipped because the bh should be inflight. We only
need to write dirty bh. And TX and dirty state bh both should be waited until
flushed.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
tx buffers need to go on the bh_lru_rest as well, and removing erases
(not inserts) them into dirty_or_tx_bh.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
The else-if chain here was wrong. Handling dirty or tx buffers and
errors should be in independent conditions.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Librbd will calculate max dirty object according to rbd_cache_max_size, it
doesn't suitable for every case. If user set image order 24, the calculating
result is too small for reality. It will increase the overhead of trim call
which is called each read/write op.
Now we make it as option for tunning, by default this value is calculated.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Flush op in ObjectCacher will iterate the whole active object set, each
dirty object also may own several BufferHead. If the object set is large,
it will consume too much time.
Use dirty_bh instead to reduce overhead. Now only dirty BufferHead will
be checked.
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
This reverts commit 74b386f03e, reversing
changes made to 36265d0db0.
The dirty_or_tx list is used by flush_set, which means we can
resubmit new IOs for writes that are already in progress. This
has a compounding effect that overwhelms the OSDs with dup IOs
and stalls out the client.
See, for example, teh failues in this run:
/a/sage-2014-07-25_17:14:20-fs-wip-msgr-testing-basic-plana
The fix is probably pretty simple, but reverting for now to make
the tests pass.
Signed-off-by: Sage Weil <sage@inktank.com>
In the 0.82 release, standbyreplay MDS daemons would try
to reformat the jouranl if they saw an older version on
disk, where this should have only been done by the active
MDS for the rank. Depending on timing, this could cause
fatal corruption of the journal.
This change handles the following cases:
* only do reformat if not in standbyreplay (else raise EAGAIN
to keep trying til an active mds reformats it)
* if journal header goes away while in standbyreplay then raise
EAGAIN (handle rewrite happening in background)
* if journal version is greater than the max supported, suicide
Fixes: #8811
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 5438500af8)
If the cache is full, we block some requests, and then we change the
cache_mode to something else (say, forward), the full waiters don't get
requeued until the cache becomes un-full. In the meantime, however, later
requests will get processed and redirected, breaking the op ordering.
Fix this by requeueing any full waiters if we see that the cache_mode is
not writeback.
Fixes: #8931
Signed-off-by: Sage Weil <sage@redhat.com>