diff options
Diffstat (limited to 'fs/dlm/lowcomms.h')
-rw-r--r-- | fs/dlm/lowcomms.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/dlm/lowcomms.h b/fs/dlm/lowcomms.h index a4384826442c..66dc1bb3de7f 100644 --- a/fs/dlm/lowcomms.h +++ b/fs/dlm/lowcomms.h @@ -13,6 +13,16 @@ #define __LOWCOMMS_DOT_H__ #define LOWCOMMS_MAX_TX_BUFFER_LEN 4096 +#define CONN_HASH_SIZE 32 + +/* This is deliberately very simple because most clusters have simple + * sequential nodeids, so we should be able to go straight to a connection + * struct in the array + */ +static inline int nodeid_hash(int nodeid) +{ + return nodeid & (CONN_HASH_SIZE-1); +} /* switch to check if dlm is running */ extern int dlm_allow_conn; |