Rajesh Prasad has uploaded this change for review.
mdcache: defer reap of directory entries with live dir_chunk references
RCA -
The LRU entry reaper (lru_reap_impl) selects a directory entry D1 as a
reclaim victim and the existing reap_check callback (skip_populate_dir)
returns false because the reaping thread is populating a DIFFERENT
directory D2 (skip_populate_dir only protects the same directory it was
called with; D1 != D2 means no protection).
Fix -
Introduced a inline helper function mdcache_has_active_chunks(entry) that
walks the entry's chunk list under the already-held CIH latch and QLANE lock,
checking whether any chunk has:
chunk->chunk_lru.refcnt > LRU_SENTINEL_REFCOUNT
When mdcache_has_active_chunks() returns true, lru_reap_impl releases the
CIH latch and QLANE lock, unrefs the temp ref, and moves to the next lane
candidate. D1 stays in the LRU. Once the Thread releases its last chunk
ref, refcnt returns to the sentinel value and D1 becomes reclaimable on the
next pass.
Change-Id: Ib6cd14db3e7610221a125223dbb01160da00e27e
Signed-off-by: Rajesh Prasad <raprasad@redhat.com>
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_lru.c
1 file changed, 71 insertions(+), 2 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/01/1255501/1
To view, visit change 1255501. To unsubscribe, or for help writing mail filters, visit settings.