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