This lets us drop the src, orig_src ceph_entity_addr's from the message
header, saving about 160 bytes per message.
The feature is optional. We can still talk to peers who use the old
protocol.
Do not journal ack unless the tid is registered in the LogSegment. Once
we journal it, we remove it from the LogSegment list, and once it's
journaled, we remove the pending_commit[tid] entry.
This fixes a bug where the mds got two acks, journaled both of them, and
crashed in the completion for the second because pending_commit[tid] was
gone. The second ack should have been ignored.
The rejoin ack intializes replica lock states correctly; we can't send any
lock messages before that. This fixes both the check max size call (which
sends lock messages taking the wrlock) and the file_recover() call
(which does the same).
Instead, we make two lists, files to recover and those to fix up. The lock
states for both are set to PRE_SCAN (LOCK on replica). After the rejoin
acks go out, we either check_inode_max_size or file_recover.
If file_recover someday grows another caller, this may need something a bit
more sophisticated.
This ensures that the auth inode continues to maintain accurate scatterlock
info about open frags. We include info on export if it is a bounding frag.
On import, we only take it if we are !auth. This mirrors the scatterlock
scatter/gather logic in CInode::{encode,decode}_lock_state.
Otherwise we can get into a loop:
eval_stray
purge_stray
_purge_stray_purged
journal truncate
eval_stray
...
This doesn't explain what the stray pin was that I saw, but it at least
avoids the looping.
We used to skip base inodes for scatter_writebehind. But we can
journal these just like anything else, and it potentially breaks
try_to_expire if a base inode's lock is dirty, because the
completion queued on WAIT_STABLE by scatter_nudge never gets
completed.
I'm reluctant to stick this in the objecter since it doesn't quite fit, but
it's a pool management function and putting it here makes it easy to use
elsewhere while maintaining librados' standard function flow.