This keeps things consistent with what we'd get with
path_traverse. Namely, it means that if done_locking gets
set to true, then a future call to rdlock_path_pin_ref can
bail out and return mdr->in[n] and get a correct value.
This fixes
touch mnt/a
ls mnt
touch mnt/.ceph
mds hang on the create request.
Do not clear laggy flag (or otherwise get into prepare_update) if the mds
hasn't seen the latest map. Previously we could go to clear laggy and also
revert to an old mds state.
The eval may lead to a scatter_writebehind, which screws up the journal
ordering. Since the inode is also locked, we will end up evaling it
later anyway, so don't worry about it.
I'm a bit unsure about the adjust_subtree_after_rename... that is during
the rename_apply stage (after the log entry committed), so i think it's
safe to do a scatter_writebehind here.. since we're not between a predirty
and submit_entry.
set_state moves the session to the per-session lists; do
this _before_ remove_session (which removes the session
entirely). Otherwise we fail an assert when deleting
the session:
mds/SessionMap.h: In function 'virtual Session::~Session()':
mds/SessionMap.h:141: FAILED assert(!session_list_item.is_on_xlist())
1: ./cmds(_Z18__ceph_assert_failPKcS0_iS0_+0x36) [0x97fc87]
2: ./cmds(_ZN7SessionD0Ev+0x47) [0x73d817]
3: ./cmds(_ZN16RefCountedObject3putEv+0xdb) [0x712c3b]
4: ./cmds(_ZN10ConnectionD0Ev+0x3a) [0x713f88]
5: ./cmds(_ZN10Connection3putEv+0x3d) [0x71294b]
6: ./cmds(_ZN15SimpleMessenger4PipeD1Ev+0x7f) [0x7130e1]
7: ./cmds(_ZN15SimpleMessenger6reaperEv+0x228) [0x7048ba]
8: ./cmds(_ZN15SimpleMessenger4waitEv+0x28) [0x7059dc]
9: ./cmds(main+0x305) [0x6f9345]
10: /lib/libc.so.6(__libc_start_main+0xe6) [0x7f2091e715c6]
11: ./cmds [0x6f8e39]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
Don't ignore client replay or session msgs if we are
moving to reconnect state. The client may get the mdsmap
before us and send things our way, so take them if we
are reconnect, or if we want reconnect.