]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sunrpc: add SUNRPC_CMD_CACHE_FLUSH netlink command
authorJeff Layton <jlayton@kernel.org>
Wed, 25 Mar 2026 14:40:33 +0000 (10:40 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 1 Jun 2026 15:08:18 +0000 (11:08 -0400)
commit565ee23ea2374a0ec42bb70227447baa81fcd196
tree63d854ad04089691c5a3094232b105e0da5d07e2
parent01c2305795a3b6b164df48e72b12022a68fd60c1
sunrpc: add SUNRPC_CMD_CACHE_FLUSH netlink command

Add a new SUNRPC_CMD_CACHE_FLUSH generic netlink command that allows
userspace to flush the sunrpc auth caches (ip_map and unix_gid) without
writing to /proc/net/rpc/*/flush.

An optional SUNRPC_A_CACHE_FLUSH_MASK u32 attribute selects which caches
to flush (bit 1 = ip_map, bit 2 = unix_gid). If the attribute is
omitted, all sunrpc caches are flushed.

This is used by exportfs to replace its /proc-based cache_flush() with a
netlink equivalent, with /proc fallback for older kernels.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Documentation/netlink/specs/sunrpc_cache.yaml
include/uapi/linux/sunrpc_netlink.h
net/sunrpc/netlink.c
net/sunrpc/netlink.h
net/sunrpc/svcauth_unix.c