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>
Tue, 22 Apr 2025 09:05:33 +0000 (11:05 +0200)
commitb2f26759f0eae64c9fc79a0763da77b199d40ecc
tree59d6387dec2a2e9910fbd9f0dd76529059349164
parent48a237fa6490a994d3259a238e962b6179cb03af
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>
(cherry picked from commit e8c657a034d5ff4ad9648370faea5b9f1039d6fb)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/fd-t.h
include/haproxy/fd.h
src/cli.c
src/fd.c