Lines Matching +full:rpc +full:- +full:if
1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Scheduling primitives for kernel Sun RPC.
22 * This is the actual RPC procedure call info.
41 * This is the RPC task struct
58 struct rpc_wait_queue *tk_waitqueue; /* RPC wait queue we're on */
61 struct rpc_wait tk_wait; /* RPC wait */
64 int tk_rpc_status; /* Result of last RPC operation */
67 * RPC call state
69 struct rpc_message tk_msg; /* RPC call info */
73 struct rpc_clnt * tk_client; /* RPC client */
77 struct rpc_rqst * tk_rqstp; /* RPC request */
82 ktime_t tk_start; /* RPC task init timestamp */
88 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
120 * RPC task flags
124 #define RPC_TASK_MOVEABLE 0x0004 /* nfs4.1+ rpc tasks */
131 #define RPC_TASK_SOFTCONN 0x0400 /* Fail if can't connect */
134 #define RPC_TASK_NOCONNECT 0x2000 /* return ENOTCONN if not connected */
138 #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
139 #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
140 #define RPC_IS_SOFT(t) ((t)->tk_flags & (RPC_TASK_SOFT|RPC_TASK_TIMEOUT))
141 #define RPC_IS_SOFTCONN(t) ((t)->tk_flags & RPC_TASK_SOFTCONN)
142 #define RPC_WAS_SENT(t) ((t)->tk_flags & RPC_TASK_SENT)
143 #define RPC_IS_MOVEABLE(t) ((t)->tk_flags & RPC_TASK_MOVEABLE)
153 #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)
154 #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)
156 test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)
160 clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \
164 #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)
165 #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)
169 clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \
173 #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)
175 #define RPC_SIGNALLED(t) test_bit(RPC_TASK_SIGNALLED, &(t)->tk_runstate)
179 * Note: if you change these, you must also change
182 #define RPC_PRIORITY_LOW (-1)
186 #define RPC_NR_PRIORITY (1 + RPC_PRIORITY_PRIVILEGED - RPC_PRIORITY_LOW)
195 * RPC synchronization objects
200 unsigned char maxpriority; /* maximum priority (0 if queue is not a priority queue) */
205 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
215 #define RPC_IS_PRIORITY(q) ((q)->maxpriority > 0)
269 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
284 #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
287 return ((q && q->name) ? q->name : "unknown"); in rpc_qname()
293 q->name = name; in rpc_assign_waitqueue_name()
302 #if IS_ENABLED(CONFIG_SUNRPC_SWAP)
309 return -EINVAL; in rpc_clnt_swap_activate()