os/FileJournal: do not request sync while shutting down

FileStore calls should_commit_now() to determine whether it should
loop and do a second sync (among other things).  During shutdown, this
can force us into a livelock: the journal is shutting down, but the
sync_entry loop never completes and repeatedly syncs because the
journal is full.  Since the journal is otherwise stopped, no expire
happens and we never become unfull, and we're stuck.

This seems to be triggered semi-reliably by the ceph_objectstore_tool
import function.

Fix by not requesting a sync while shutting down.

Fixes: #9545
Signed-off-by: Sage Weil <sage@redhat.com>
ceph_test_rados_api_tier: add EvictSnap2 test case

Verify an evict doesn't create a snapdir object.  Reproduces #8629

Signed-off-by: Sage Weil <sage@redhat.com>
osd/ReplicatedPG: do not clone or preserve snapdir on cache_evict

If we cache_evict a head in a cache pool, we need to prevent
make_writeable() from cloning the head and finish_ctx() from
preserving the snapdir object.

Fixes: #8629
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
Merge remote-tracking branches 'guangyy/wip-9008', 'somnathr/wip-obj-delete-fix', 'origin/wip-9574', 'upstream/wip-8629' and 'upstream/wip-9545' into wip-sam-testing