mds: don't update migrate_seq when importing non-auth cap

We use migrate_seq to distinguish old and new auth MDS. So we should
not change migrate_seq when importing non-auth cap.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: fix frozen check in Server::try_open_auth_dirfrag()

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: handle undefined dirfrags when opening inode

When MDS is rejoin stage, cache rejoin message can add undefined
inodes and dirfrags to the cache. These undefined objects can affect
"lookup-by-ino" processes. If an undefined dirfrag is encountered,
we should fetch it from disk.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: try purging stray inode after storing backtrace

Inode is auth pinned and can't be purged while storing backtrace,
so we should try purging stray inode after storing backtrace.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: fix cross-authorty rename race

When doing cross-authorty rename, we need to make sure bystanders
have received all messages sent by inode's original auth MDS,
then change inode's authorty. Otherwise lock messages sent by the
original/new auth MDS can arrive bystanders out of order. The fix
is: inode's original auth MDS sends notify messages to bystanders,
performs slave rename after receiving all bystanders' notify acks.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: don't journal bare dirfrag

don't journal bare dirfrag when starting scatter. also add debug
code for bare dirfrag modification.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
PGLog: clear missing on backfill reset

When backfill is reset, the missing set should be cleared
since all objects are >last_backfill.

Fixes: #5320
Signed-off-by: Samuel Just <sam.just@inktank.com>
FileStore: add rmkeyrange

Handling it in DBObjectMap really only has efficiency
advantages if the object is a clone.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: remove ondisklog usages from PG

ondisklog is now only relevant for the divergent priors mapping.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: pass only divergent_priors, not ondisklog

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: remove other ondisklog references

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: remove OndiskLog

Signed-off-by: Samuel Just <sam.just@inktank.com>
osd_types: move code for pg_log_entry_t::get_key_name into eversion_t

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: track dirty_to and dirty_from for log

This allows the log to only write out/clear the keys
which have actually changed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG: move instances of log dirtying in PG into PGLog

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: replace dirty_log with mark_dirty_*

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG,PGLog: remove dirty_log arguments

Signed-off-by: Samuel Just <sam.just@inktank.com>
test/osd/TestPGLog: fix pglog unittests for dirty_log and ondisklog

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog: add debug check on written keys, verify on write

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog,PG: use normal log dirtying and writing for append and trim

Signed-off-by: Samuel Just <sam.just@inktank.com>