ceph-osd: --flush-journal: sporadic segfaults on exit
FileStore holds a number of recources like op thread pool and work
queue, key/value DB threads, etc. These should be properly stopped
(released) before exiting to avoid segfaults on exit.
Note: more code paths (mkfs, dump_journal, etc) need similar fixes,
these will be submitted as separate patches.
Fixes: http://tracker.ceph.com/issues/18820
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
(cherry picked from commit
00184814c156f6194a6ba4b696073ca1c18a3f8f)
Adjustments:
- release g_ceph_context in the same way as the main code path does