Olga Kornievskaia | 7467874 | 2021-06-08 15:59:10 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (c) 2020 Anna Schumaker <Anna.Schumaker@Netapp.com> |
| 4 | */ |
| 5 | #ifndef __SUNRPC_SYSFS_H |
| 6 | #define __SUNRPC_SYSFS_H |
| 7 | |
Olga Kornievskaia | c5a382e | 2021-06-08 15:59:12 -0400 | [diff] [blame] | 8 | struct rpc_sysfs_client { |
| 9 | struct kobject kobject; |
| 10 | struct net *net; |
Olga Kornievskaia | 2a338a5 | 2021-06-08 15:59:17 -0400 | [diff] [blame] | 11 | struct rpc_clnt *clnt; |
| 12 | struct rpc_xprt_switch *xprt_switch; |
Olga Kornievskaia | c5a382e | 2021-06-08 15:59:12 -0400 | [diff] [blame] | 13 | }; |
| 14 | |
Olga Kornievskaia | baea994 | 2021-06-08 15:59:16 -0400 | [diff] [blame] | 15 | struct rpc_sysfs_xprt_switch { |
| 16 | struct kobject kobject; |
| 17 | struct net *net; |
| 18 | struct rpc_xprt_switch *xprt_switch; |
| 19 | struct rpc_xprt *xprt; |
| 20 | }; |
| 21 | |
Olga Kornievskaia | d408ebe | 2021-06-08 15:59:18 -0400 | [diff] [blame] | 22 | struct rpc_sysfs_xprt { |
| 23 | struct kobject kobject; |
| 24 | struct rpc_xprt *xprt; |
Olga Kornievskaia | 5b7eb78 | 2021-06-23 23:28:50 -0400 | [diff] [blame] | 25 | struct rpc_xprt_switch *xprt_switch; |
Olga Kornievskaia | d408ebe | 2021-06-08 15:59:18 -0400 | [diff] [blame] | 26 | }; |
| 27 | |
Olga Kornievskaia | 7467874 | 2021-06-08 15:59:10 -0400 | [diff] [blame] | 28 | int rpc_sysfs_init(void); |
| 29 | void rpc_sysfs_exit(void); |
| 30 | |
Olga Kornievskaia | 2a338a5 | 2021-06-08 15:59:17 -0400 | [diff] [blame] | 31 | void rpc_sysfs_client_setup(struct rpc_clnt *clnt, |
| 32 | struct rpc_xprt_switch *xprt_switch, |
| 33 | struct net *net); |
Olga Kornievskaia | c5a382e | 2021-06-08 15:59:12 -0400 | [diff] [blame] | 34 | void rpc_sysfs_client_destroy(struct rpc_clnt *clnt); |
Olga Kornievskaia | baea994 | 2021-06-08 15:59:16 -0400 | [diff] [blame] | 35 | void rpc_sysfs_xprt_switch_setup(struct rpc_xprt_switch *xprt_switch, |
| 36 | struct rpc_xprt *xprt, gfp_t gfp_flags); |
| 37 | void rpc_sysfs_xprt_switch_destroy(struct rpc_xprt_switch *xprt); |
Olga Kornievskaia | d408ebe | 2021-06-08 15:59:18 -0400 | [diff] [blame] | 38 | void rpc_sysfs_xprt_setup(struct rpc_xprt_switch *xprt_switch, |
| 39 | struct rpc_xprt *xprt, gfp_t gfp_flags); |
| 40 | void rpc_sysfs_xprt_destroy(struct rpc_xprt *xprt); |
Olga Kornievskaia | c5a382e | 2021-06-08 15:59:12 -0400 | [diff] [blame] | 41 | |
Olga Kornievskaia | 7467874 | 2021-06-08 15:59:10 -0400 | [diff] [blame] | 42 | #endif |