mds: try to flush the mdlog when requesting the rdlock
After client requests' early_reply() the mdlog won't be flushed
immediately, but it will hold the write lock. So if the client
sends another request to a different MDS daemon, which then needs
to request read lock, then it maybe stuck at most for 5 seconds.
Let's try to flush the mdlog which might release the write locks
after mdlog is successfully flushed.
Fixes: https://tracker.ceph.com/issues/51069
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
63f7a165ec6bbf9cb1bded29f8bc5c017c01c768)