This requires making the late-decoded attributes mutable.
The motivation is to allow get_paths and all the code downstream
of that to be const too.
Signed-off-by: John Spray <john.spray@inktank.com>
Switch to the ENCODE_START, DECODE_START macros
for Journal::Header. As well as being nice generally,
this has the important side effect of making
journal headers written since JOURNAL_FORMAT_RESILIENT
unreadable to older MDSs, as they will fail their check
on Header.magic.
Signed-off-by: John Spray <john.spray@inktank.com>
It was doing an unnecessary series of splices() after
reading header, replace with a single pass through
the data and one splice at the end.
Signed-off-by: John Spray <john.spray@inktank.com>
This is useful for testing, so that we can create an
old-style journal and then test the version migration
by changing the config setting.
Signed-off-by: John Spray <john.spray@inktank.com>
Two main pieces to this:
* A new JournalPointer object that stores two journal
inodes so that we can do a double-buffered update,
followed by an atomic swap.
* An extended recovery process in MDLog that dereferences
the JournalPointer and conditionally rewrites the
journal to accomodate format updates.
The JournalPointer indirection should also be useful for
making cephfs-journal-tool do updates more safely.
Signed-off-by: John Spray <john.spray@inktank.com>
This is used in subsequent commits to delete journals
that are no longer needed, such as after rewriting
a journal in a different format.
Signed-off-by: John Spray <john.spray@inktank.com>
Fix redundant (and subtly incorrect) calculation of
the number of bytes needed. It worked because waiting
for a few more bytes before reading the entry size
of an old-format entry was harmless.
Signed-off-by: John Spray <john.spray@inktank.com>
Use the new CInode::encode_bare/decode_bare fns
in CDir, so that we only have one implementation
of the inode encode/decode code.
Signed-off-by: John Spray <john.spray@inktank.com>
Improve documentation in quick-ceph-deploy.rst
Use admin-node consistently.
ceph should be installed on admin-node for the following reasons:
"ceph-deploy admin admin-node" assumes that /etc/ceph exists.
"ceph health" requires the use of ceph
Signed-off-by: Kevin Dalley <kevin@kelphead.org>
This change uses admin-node in the quick-common.rst file, including
the graph. This name is already used in
quick-ceph-deploy.rst.
Signed-off-by: Kevin Dalley <kevin@kelphead.org>
dsnapc.snaps will be non-empty most of the time if there
have been snaps before prev_snapc. What we really want to
know is whether there are any snaps between oi.snaps.back()
and prev_snapc.
Fixes: 8334
Backport: firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
If we stop between unlinking the empty subdir and removing the root
merge marker, we get ENOENT on the get_info. That's actually fine.
Backport: firefly
Fixes: 8332
Signed-off-by: Samuel Just <sam.just@inktank.com>
Mention recent Ceph releases.
Move important message about sudo and ceph-deploy closer to the use of
ceph-deploy.
Mention files created by ceph-deploy comment
Separate apt-get from yum command
Signed-off-by: Kevin Dalley <kevin@kelphead.org>
The location of the ceph wiki FAQ has changed.
Now, the link from ceph documentation matches the current FAQ location
Signed-off-by: Kevin Dalley <kevin@kelphead.org>
When we send redirected ops, we do not assign a new tid, which means that
a given client's ops for a pool may not have strictly ordered tids. Skip
this check if the pool is tiered to avoid false positives.
Fixes: #8380
Signed-off-by: Sage Weil <sage@inktank.com>