instead of recalculating it. Also pass the last map into warm_restart,
while we're at it. Drop the Reset state constructor and instead repost
the AdvMap event before transitioning.
Signed-off-by: Sage Weil <sage@newdream.net>
This is slow, eats memory, and dumps huge amounts of crap to the debug
logs when enabled. Leave it off unless we are actually hunting down a bug.
Signed-off-by: Sage Weil <sage@newdream.net>
This was broken by the osd_trans work merged in 01f3526b62. We need to
use the obs reference to new_obs. This caused objects to be deleted during
pg recovery.
Signed-off-by: Sage Weil <sage@newdream.net>
Convert new_down to new_state, with values xored onto the old state. We
preserve compatibility with old incrementals because they were (virtually)
always 0, and we can special case that to mean toggle CEPH_OSD_UP. We
don't really care if clients get new values right.. if they don't clear
the EXISTS flag that doesn't really hurt them. It's only important that
the monitor get it right.
To ensure that, we rev the monitor internal protocol.
Signed-off-by: Sage Weil <sage@newdream.net>
We already check sessions a bit further down, and this code only worked
when we got incrementals, not full maps. Take it out.
Signed-off-by: Sage Weil <sage@newdream.net>
Just omit the owner field from the ACL XML. It is optional anyway.
Don't supply an --owner switch. The owner will always be the same user
that created the object.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Previously, peering was handled by a defacto state machine in do_peer
and related methods. Peering state will now be encapsulated in
RecoveryState, which uses boost::state_chart internally to enforce an
explicit state machine abstraction. OSD::handle_pg_* pass off to
PG::handle_*, which pass messages to the state machine.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
OSD::advance_map previously handled resetting the PG for peering. Now,
PG::acting_up_affected returns true if peering needs to be restarted and
PG::warm_restart takes care of restting the pg.
The fuse layer passes through "encoded" dev_t values (probably for
compatibility reasons or something). I copied the encode/decode methods
from the kernel and encode/decode the st_rdev values where appropriate
(where struct stat is exposed directory or via the fuse_entry_param
struct).
Fixes: #1031
Signed-off-by: Sage Weil <sage@newdream.net>
It was using the MDS_TRAVERSE_DISCOVERXLOCK flag, which allows
path_traverse to return success if it encounters a NULL dentry. When
we're looking for a source inode, though, that doesn't work out! We
want MDS_TRAVERSE_DISCOVER, which will go away and look for the dentry
on other inodes but requires a linked dentry, not a NULL one.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Consider:
- peer auth for /foo
- ambiguous import /foo/bar
- peer claims /foo, swallows /foo/bar.
- disambiguate_imports sees we didn't get /foo/bar, cancels ambiguous
import.
-> we are left with /foo/bar (and content) in cache, even tho it is
non-auth.
Fix by pulling the try_trim_non_auth_subtree() back out of
cancel_ambiguous_import, and trimming the containing subtree in the
disambiguate (resolve completion) case. (For the journal replay case the
subtree structure is deterministic and no such check is needed.)
Signed-off-by: Sage Weil <sage@newdream.net>
Remove from the uncommitted list.
Also, make uncommitted list updated unconditional: we need to do it even
if the inode wasn't already in our cache.
Also, journal the rollback with the same signedness as the prepare, so that
the descriptor/map key matches up. Adjust signs accordingly.
Signed-off-by: Sage Weil <sage@newdream.net>
Otherwise, once we remove daemonize from the prototype,
all the existing ->start(false) calls will be taken
to mean nonce=0.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>