DEBUG: fd: add a counter of takeovers of an FD since it was last opened
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Jan 2025 14:59:11 +0000 (15:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 10:39:38 +0000 (11:39 +0100)
commite8c657a034d5ff4ad9648370faea5b9f1039d6fb
tree8e59d4302b315ba24a84ba45b2b64e31bbb5a03c
parenta719b90b565a58b3149d2cc4f355d446bc9f727c
DEBUG: fd: add a counter of takeovers of an FD since it was last opened

That's essentially in order to help with debugging strange cases like
the occasional epoll issues/races, by keeping a counter of how many
times an FD was taken over since last inserted. The room is available
so let's use it. If it's needed later, this patch can easily be reverted.
The counter is also reported in "show fd" as "tkov".

(cherry picked from commit 44ac7a7e731537c9388a141b69cff7074afe2376)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/fd-t.h
include/haproxy/fd.h
src/cli.c
src/fd.c