summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/svc.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2023-07-29 21:33:05 +0300
committerChuck Lever <chuck.lever@oracle.com>2023-08-30 00:45:22 +0300
commit3275694adf0f89e1cdcacfee16103be6643c2a0c (patch)
treeb03b80a5f27bce95ba10d2b5a415f84b6144de62 /include/linux/sunrpc/svc.h
parentba4bba6c97d40fa9f2aa25a34f6e9717a468c8f3 (diff)
downloadlinux-3275694adf0f89e1cdcacfee16103be6643c2a0c.tar.xz
SUNRPC: change svc_pool::sp_flags bits to enum
When a sequence of numbers are needed for internal-use only, an enum is typically best. The sequence will inevitably need to be changed one day, and having an enum means the developer doesn't need to think about renumbering after insertion or deletion. Such patches will be easier to review. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/sunrpc/svc.h')
-rw-r--r--include/linux/sunrpc/svc.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index b206fdde8e97..dc526240de5e 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -42,12 +42,16 @@ struct svc_pool {
struct percpu_counter sp_sockets_queued;
struct percpu_counter sp_threads_woken;
-#define SP_TASK_PENDING (0) /* still work to do even if no
- * xprt is queued. */
-#define SP_CONGESTED (1)
unsigned long sp_flags;
} ____cacheline_aligned_in_smp;
+/* bits for sp_flags */
+enum {
+ SP_TASK_PENDING, /* still work to do even if no xprt is queued */
+ SP_CONGESTED, /* all threads are busy, none idle */
+};
+
+
/*
* RPC service.
*