mds: fix race of fetching large dirfrag
When a dirfrag contains more than 'mds_dir_keys_per_op' items, MDS
needs to send multiple 'omap-get-vals' requests to fetch the dirfrag
completely. There is a race if MDS commits the dirfrag in the middle
of these 'omap-get-vals' requests.
Re-fetch from the beginning if dirfrag get committed in the middle of
omap-get-vals requests.
Fixes: https://tracker.ceph.com/issues/49617
Signed-off-by: Erqi Chen <chenerqi@kuaishou.com>
(cherry picked from commit
0767336b43155426af8d4ea9f85a7cfbbf032e8c)
Conflicts:
src/mds/CDir.cc
- master sends different argument to oloc()
src/mds/CDir.h
- master has ceph::buffer::list& hdrbl