mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-06-21 15:43:21 +02:00
565ee23ea2
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>
85 lines
1.8 KiB
C
85 lines
1.8 KiB
C
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
|
|
/* Do not edit directly, auto-generated from: */
|
|
/* Documentation/netlink/specs/sunrpc_cache.yaml */
|
|
/* YNL-GEN uapi header */
|
|
/* To regenerate run: tools/net/ynl/ynl-regen.sh */
|
|
|
|
#ifndef _UAPI_LINUX_SUNRPC_NETLINK_H
|
|
#define _UAPI_LINUX_SUNRPC_NETLINK_H
|
|
|
|
#define SUNRPC_FAMILY_NAME "sunrpc"
|
|
#define SUNRPC_FAMILY_VERSION 1
|
|
|
|
enum sunrpc_cache_type {
|
|
SUNRPC_CACHE_TYPE_IP_MAP = 1,
|
|
SUNRPC_CACHE_TYPE_UNIX_GID = 2,
|
|
};
|
|
|
|
enum {
|
|
SUNRPC_A_CACHE_NOTIFY_CACHE_TYPE = 1,
|
|
|
|
__SUNRPC_A_CACHE_NOTIFY_MAX,
|
|
SUNRPC_A_CACHE_NOTIFY_MAX = (__SUNRPC_A_CACHE_NOTIFY_MAX - 1)
|
|
};
|
|
|
|
enum {
|
|
SUNRPC_A_IP_MAP_SEQNO = 1,
|
|
SUNRPC_A_IP_MAP_CLASS,
|
|
SUNRPC_A_IP_MAP_ADDR,
|
|
SUNRPC_A_IP_MAP_DOMAIN,
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UNRPC_CMD_MAX,
|
|
SUNRPC_CMD_MAX = (__SUNRPC_CMD_MAX - 1)
|
|
};
|
|
|
|
#define SUNRPC_MCGRP_NONE "none"
|
|
#define SUNRPC_MCGRP_EXPORTD "exportd"
|
|
|
|
#endif /* _UAPI_LINUX_SUNRPC_NETLINK_H */
|