]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: trim cache regularly for standby-replay 40744/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Mar 2021 03:09:30 +0000 (20:09 -0700)
committerRamana Raja <rraja@redhat.com>
Fri, 16 Apr 2021 22:24:49 +0000 (18:24 -0400)
commit722847e14ec4206baab5bc80510562e47b71a4a8
treeb8959a98fbf8e9ad354ec92491133ed991f27496
parent90feccafd5b0fb237ad2da3a1d0f341ee55213ae
mds: trim cache regularly for standby-replay

This change is slightly awkward because standby-replay MDS do not do all
the kinds of upkeep a normal active MDS does. In particular, it is not
going to recall client state from clients.

This diff also merges the extra recall_client_state in
MDCache::check_memory_usage into its only caller (the upkeep thread)
where it was also doing a recall. That's just a matter of merging the
recall flags. This has the added benefit of making
MDCache::check_memory_usage callable for all MDS daemons regardless of
state.

Fixes: https://tracker.ceph.com/issues/50048
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 19293d9b9d19c32af4de655cd59e206056b2417d)

Conflicts:
src/mds/MDCache.cc
- conflict was caused by an additional line "upkeep_last_trim = clock::now();"
  which should have been dropped by da45b4e7ca3a1c88c44424256c104b07710e9679
  (nautilus cherry-pick of master commit
  af4cac5ec7bab4e5bf8936cd685f6ee8dcb38127)
src/mds/MDCache.h
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDSRank.cc
src/mds/MDSRank.h