Files
scoutfs/kmod
Auke Kok bf56585559 Drop a non-zero totl key if it has no contributing xattrs.
The expected case is when the last xattr with a totl key is removed that
the count and value both reach zero. In case of a mismatch or corrupted
value, we have several different failure modes:

- count zero, value non-zero
- value zero, count non-zero
- both non-zero

The first case is the easiest to resolve, which is what this patch does
- it drops it and prints an error.

The other cases are more difficult and need a manual method to erase the
stale key, and one would have to scan the entire namespace to make sure
that the xattrs are indeed all removed.

Signed-off-by: Auke Kok <auke.kok@versity.com>
2026-03-27 09:59:47 -07:00
..