cephfs-mirror: remove redundant ceph_close() calls.
https://github.com/ceph/ceph/pull/55619 eliminates the need for ceph_close() call after successful ceph_fdopendir() one.
And introduces automatic file descriptor's close when corresponding ceph_closedir() is called.
That hasty ceph_close() call makes file descriptor
available for a new allocation which might conflict with the automatic fd close in the above ceph_closedir().
Full PeerReplayer::do_synchronize() has been reworked to close fds
properly, depending on whether ceph_fdopendir() has been already applied
to them.
Additionally for the sake of uniformity this reworks incremental do_synchronize()
in a way to do final fd closings similar to full implementation.
Plus this effectively reverts
https://github.com/ceph/ceph/pull/56118/commits/
bd78bdca3d7d7659b7ec0f12b77a2002282fec13
as it looks like a wrong approach to fight broken file descriptor
references. No much sense in reopening of the current snapshot's root folder
on each new entry processing. Instead this patch just doesn't close it from the
beginning.
Fixes: https://tracker.ceph.com/issues/68853
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>