SIGN IN SIGN UP

client: add defensive checks for LRU pin counter

sometimes we hit a SIGSEGV in LRU::adjust() after num_pinned grew
larger than the LRU size (num_pinned=2, size=1 in the core dump).
Add client-side diagnostics only — no LRU logic changes.
Introduce assert_lru_num_pinned_sane() and call it around trim_cache,
close_dir parent unpin, and unlink/lru_remove. On drift it logs LRU
list sizes (and dentry ref/pin state when known) via lderr, then
asserts instead of crashing deep inside LRU::adjust().
Also assert dn->dir is set in trim_dentry/unlink, and log when
close_dir drops the parent dentry pin (suspected trigger path).

Signed-off-by: Igor Golikov <igolikov@redhat.com>
Fixes: https://tracker.ceph.com/issues/77947
I
Igor Golikov committed
820c08c096e5c48c70f6d0258f52de658f780840
Parent: 0a3d6e3