]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: fix shutdown hang when ephemeral pins active and max_mds is 0 68413/head
authorchungfengz <chungfengz@synology.com>
Thu, 16 Apr 2026 06:54:16 +0000 (06:54 +0000)
committerVenky Shankar <vshankar@redhat.com>
Mon, 8 Jun 2026 09:05:19 +0000 (14:35 +0530)
commit039eba34a61a0197ca51c959c20b5398c0f66ef5
treeb89dfaf77c28244f4ed217fa372895e6ed45cf72
parentde9db7ce99fb6b3e4810be666b0fd5e8bbb31bf7
mds: fix shutdown hang when ephemeral pins active and max_mds is 0

During shutdown, `ceph fs set <fs> down true` sets max_mds to 0 before
the MDS daemons have finished exporting their subtrees.  shutdown_pass()
iterates over auth subtrees and skips any dir whose inode is
ephemerally pinned, expecting handle_export_pins() to re-place them.
However, handle_export_pins() calls hash_into_rank_bucket() which (after
the companion fix) now returns MDS_RANK_NONE when max_mds == 0.  With
no valid target rank the export is never scheduled, so the ephemerally-
pinned dirs are skipped by shutdown_pass() indefinitely and the daemon
loops.

Fixes: https://tracker.ceph.com/issues/76059
Signed-off-by: chungfengz <chungfengz@synology.com>
src/mds/MDCache.cc