]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix race of fetching large dirfrag 40252/head
authorErqi Chen <chenerqi@gmail.com>
Thu, 4 Mar 2021 13:48:09 +0000 (21:48 +0800)
committersinguliere <singuliere@autistici.org>
Fri, 19 Mar 2021 18:13:28 +0000 (19:13 +0100)
commit28eed3e6a786dca659df8f0ce287547a18aa8bc1
tree0e072d63b9254ac4a66e49aacb12cb9a2f7c3cb2
parente53ee8bd1dc964028c4186341e1e339ad8aa978b
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)
src/mds/CDir.cc
src/mds/CDir.h