MINOR: fd: add a generation number to file descriptors
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Jan 2025 15:25:40 +0000 (16:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 10:39:38 +0000 (11:39 +0100)
commit3f646022e0d7421a7f105e9aab1546fd7263ce7d
treed5d205d02fee17345578a0e2ee80e17aa1403883
parente8c657a034d5ff4ad9648370faea5b9f1039d6fb
MINOR: fd: add a generation number to file descriptors

This patch adds a counter of close() on file descriptors in the fdtab.
The goal is to better detect if reported events concern the current or
a previous file descriptor. For now the counter is only added, and is
showed in "show fd" as "gen". We're reusing unused space at the end of
the struct. If it's needed for something more important later, this
patch can be reverted.

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