relayfs: introduce getting relayfs statistics function
authorJason Xing <kernelxing@tencent.com>
Thu, 12 Jun 2025 06:11:59 +0000 (14:11 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 10 Jul 2025 05:57:51 +0000 (22:57 -0700)
commita53202ce7fbafd24f854865b02eff891e246c550
tree5e9ff87c1286c4542387937e8c8db3fcff783381
parentca01a90ae7bf9bb22137e719366bdc0f387675c2
relayfs: introduce getting relayfs statistics function

In this version, only support getting the counter for buffer full and
implement the framework of how it works.

Users can pass certain flag to fetch what field/statistics they expect to
know.  Each time it only returns one result.  So do not pass multiple
flags.

Link: https://lkml.kernel.org/r/20250612061201.34272-4-kerneljasonxing@gmail.com
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Yushan Zhou <katrinzhou@tencent.com>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/relay.h
kernel/relay.c