From: ethanwu Date: Tue, 13 Dec 2022 02:30:44 +0000 (+0800) Subject: mds: fix scan_stray_dir not reset next.frag on each run of stray inode X-Git-Tag: v18.1.0~590^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4799689d551f865078aef4607d2cc09a67caea1;p=ceph.git mds: fix scan_stray_dir not reset next.frag on each run of stray inode When we finish scanning one stray inode we should reset next.frag so that next stray inode could start from its first dir fragment rather than last stray inode's last frag. Fixes: https://tracker.ceph.com/issues/58294 Signed-off-by: ethanwu --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index b2e77edff948..101b0b55b37a 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -10120,6 +10120,7 @@ void MDCache::scan_stray_dir(dirfrag_t next) } } } + next.frag = frag_t(); } }