ceph.in: remove '--' from injectargs, if there, as well

Fixes: #9976
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Dan Mick <dan.mick@redhat.com>
tools: skip up to expire_pos in journal-tool

Previously worked for journals starting from an
object boundary (i.e. freshly created filesystems)

Fixes: #9977
Signed-off-by: John Spray <john.spray@redhat.com>
osdc: fix Journaler write error handling

Since we started wrapping the write error
handler in a finisher, multiple calls to
handle_write_error would hit the assert()
on the second call before the actual
handler had been called (at the other end
of the finisher) from the first call.

The symptom was that the MDS was intermittently
failing to respawn on blacklist, seen in #10011.

Signed-off-by: John Spray <john.spray@redhat.com>
Merge pull request #2853 from ceph/wip-9977

tools: skip up to expire_pos in journal-tool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Merge pull request #2870 from ceph/wip-blacklist-respawn

osdc: fix Journaler write error handling

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
tools: fix MDS journal import

Previously it only worked on fresh filesystems which
hadn't been trimmed yet, and resulted in an invalid
trimmed_pos when expire_pos wasn't on an object
boundary.

Fixes: #10025

Signed-off-by: John Spray <john.spray@redhat.com>
tools: persist trimmed_pos in journal dump

...rather than inferring something from expire_pos
that could leave trash behind in the range between
the original trimmed_pos and expire_pos.

Be backward compatible with old journal dumps
so that if someone is updating for other reasons
like getting better tools, they can still import
their journal.

Signed-off-by: John Spray <john.spray@redhat.com>
tools: error handling on journal import/export

Actually propagate nonzero returns codes!  Also
add checks on return values of I/O functions so
that someone doesn't think they've successfully
exported a journal if they haven't, and some
validation of the header pointers during import
so that people find out with a nice error
instead of an assertion if something is up.

Signed-off-by: John Spray <john.spray@redhat.com>

Fix compile issue in the position value cout.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
qa/workunits/fs/misc: combine sudo and echo effectively

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit abc995b6b4e0117b74c301abcb4faf4ea2ebef25)
qa/workunits/cephtool/test.sh: ceph, not ./ceph

Fixes: #10053
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2878 from ceph/wip-10025

#10025 Fix 'journal import' (aka undump)

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
0.88
Merge remote-tracking branch 'gh/next'
qa: allow small allocation diffs for exported rbds

The local filesytem may behave slightly differently. This isn't
foolproof, but seems to be reliable enough on rhel7 rootfs, where
exact comparison was failing.

Fixes: #10002
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Merge pull request #2899 from jdurgin/wip-import-export-next

qa: allow small allocation diffs for exported rbds

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Merge remote-tracking branch 'origin/next'