]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: fix race of fetching large dirfrag 39848/head
authorErqi Chen <chenerqi@gmail.com>
Thu, 4 Mar 2021 13:48:09 +0000 (21:48 +0800)
committerErqi Chen <chenerqi@gmail.com>
Sun, 7 Mar 2021 06:27:02 +0000 (14:27 +0800)
commit0767336b43155426af8d4ea9f85a7cfbbf032e8c
treeab1f6e8d7f4e003d4453d417b87df98a600bfd44
parentf977d1acf25258860d918198c88f4f07a3fe77e0
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>
src/mds/CDir.cc
src/mds/CDir.h