mailmap: Loic Dachary affiliation

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
os/FileStore: fix mount/remount force_sync race

Consider:

 - mount
 - sync_entry is doing some work
 - umount
   - set force_sync = true
   - set done = true
 - sync_entry exits (due to done)
   - ..but does not set force_sync = false
 - mount
 - journal replay starts
 - sync_entry sees force_sync and does a commit while op_seq == 0
 ...crash...

Fixes: #9144
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
os/FileStore: rename start_sync() -> do_force_sync()

Just to avoid confusion with start_sync(Context*c), which is totally
different.

Signed-off-by: Sage Weil <sage@redhat.com>
mailmap: Abhishek Lekshmanan affiliation

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@gmail.com>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Shu, Xinxin affiliation

and name normalization

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Thorsten Behrens affiliation

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Luis Pabón affiliation

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Xiaoxi Chen affiliation

Reviewed-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Huamin Chen affiliation

and name normalization

Reviewed-by: Huamin Chen <hchen@redhat.com>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Zhiqiang Wang affiliation

and name normalization

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Pavan Rallabhandi affiliation

Reviewed-by: Pavan Rallabhandi <pavan.rallabhandi@sandisk.com>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Andreas Peters name normalization

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Owen Synge affiliation

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Federico Simoncelli affiliation

Reviewed-by: Federico Simoncelli <fsimonce@redhat.com>
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mailmap: Anand Bhat affiliation

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
os/FileJournal: Update the journal header when closing journal

When closing journal, it should check must_write_header and update
journal header if must_write_header alreay set.
It can reduce the nosense journal-replay after restarting osd.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
Reviewed-by: Sage Weil <sage@redhat.com>
os/FileJournal: signal aio_cond even if seq is 0

This can happen if we write a journal but no events.

Reported-by: Somnath Roy <somnath.roy@sandisk.com>
Reported-by: Ma, Jianpeng <jianpeng.ma@intel.com>
Signed-off-by: Sage Weil <sage@redhat.com>
os/FileJournal: Tune the judge logic for read_header.

When reading journal-header, it should firstly check the result of
pread and then do decoce operation.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
os/FileJournal: Only using aio then alloc the related resources.

If define HAVE_LIBAIO, it alloc related resouces. But itt don't check whether
using aio mode. Only using aio it alloc the related resources.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
os/FileJournal: For journal-aio-mode, don't use aio when closing journal.

For jouranl-aio-mode when closing journal, the write_finish_thread_entry may exit before
write_thread_entry. This cause no one wait last aios to complete.
On some platform, after that the journal-header on journal corrupted.
To avoid this, when closing jouranl we don't use aio.

Fixes: 9073
Reported-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Tested-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>