]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: fix race of fetching large dirfrag 40774/head
authorErqi Chen <chenerqi@gmail.com>
Thu, 4 Mar 2021 13:48:09 +0000 (21:48 +0800)
committerNathan Cutler <ncutler@suse.com>
Sat, 10 Apr 2021 21:19:34 +0000 (23:19 +0200)
commitb338f952b801787ab8c68b6fa235d88319ee0847
tree2fdc01c796e69f5cbc590f1d290596eab0af6eea
parent1976598f645ad1935a5e428219713b8856796d83
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
src/mds/CDir.cc
src/mds/CDir.h