liyinshu has uploaded this change for review.

View Change

Reap entry when higher than fds_hiwat

Currently we compare open_fd_count and lru_state.entries_hiwat, to determine
whether to reap entry from L1 to L2. But open_fd_count always be zero, because
when touch file, NFSv4.1 only call OP_OPEN, rather than OP_CREATE which increase
open_fd_count. To avoid this case in future, we compare current entries_used and
lru_state_entries_hiwat to determine whether reap entry.

Change-Id: I9d786f60ddfd49e02bb838637f96b234051c2e68
Signed-off-by: liyinshu <liyinshu@bytedance.com>
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_lru.c
1 file changed, 18 insertions(+), 13 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/98/536998/1

To view, visit change 536998. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I9d786f60ddfd49e02bb838637f96b234051c2e68
Gerrit-Change-Number: 536998
Gerrit-PatchSet: 1
Gerrit-Owner: liyinshu <liyinshu@bytedance.com>
Gerrit-MessageType: newchange