]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix race of fetching large dirfrag 40720/head
authorErqi Chen <chenerqi@gmail.com>
Thu, 4 Mar 2021 13:48:09 +0000 (21:48 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 9 Apr 2021 07:41:42 +0000 (09:41 +0200)
commitc6c7fae54d9a2a988b5926169f18c905ed18487f
treea39a084777b570ad030dfa27e4a9f8638081d880
parenta3bb71c89d324b13294707f66d71b7b74886e1b6
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
src/mds/CDir.h
src/mds/CDir.cc
src/mds/CDir.h