From c754b343a2e8accaea8d6151cb7d814b0ee5c263 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 30 Mar 2018 15:00:15 +0200 Subject: [PATCH] MINOR: cli: report cache indexes in "show fd" Instead of just indicating "cache={0,1}" we now report cache.next and cache.prev since they are the ones used with the lockless fd cache. --- src/cli.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cli.c b/src/cli.c index 035f4e5a8..018d508d3 100644 --- a/src/cli.c +++ b/src/cli.c @@ -798,7 +798,7 @@ static int cli_io_handler_show_fd(struct appctx *appctx) li = fdt.owner; chunk_printf(&trash, - " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c] cache=%u owner=%p iocb=%p(%s) tmask=0x%lx umask=0x%lx", + " %5d : st=0x%02x(R:%c%c%c W:%c%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c] cnext=%d cprev=%d tmask=0x%lx umask=0x%lx owner=%p iocb=%p(%s)", fd, fdt.state, (fdt.state & FD_EV_POLLED_R) ? 'P' : 'p', @@ -815,15 +815,16 @@ static int cli_io_handler_show_fd(struct appctx *appctx) (fdt.ev & FD_POLL_IN) ? 'I' : 'i', fdt.linger_risk ? 'L' : 'l', fdt.cloned ? 'C' : 'c', - fdt.cache.next >= -2 ? 1 : 0, + fdt.cache.next, + fdt.cache.prev, + fdt.thread_mask, fdt.update_mask, fdt.owner, fdt.iocb, (fdt.iocb == conn_fd_handler) ? "conn_fd_handler" : (fdt.iocb == dgram_fd_handler) ? "dgram_fd_handler" : (fdt.iocb == listener_accept) ? "listener_accept" : (fdt.iocb == thread_sync_io_handler) ? "thread_sync_io_handler" : - "unknown", - fdt.thread_mask, fdt.update_mask); + "unknown"); if (fdt.iocb == conn_fd_handler) { chunk_appendf(&trash, " cflg=0x%08x", conn_flags);