Whamcloud - gitweb
LU-5065 utils: uninclude lustre_idl.h from lfs
[fs/lustre-release.git] / lustre / include / lustre_ver.h.in
1 #ifndef _LUSTRE_VER_H_
2 #define _LUSTRE_VER_H_
3 /* This file automatically generated from lustre/include/lustre_ver.h.in,
4  * based on parameters in lustre/autoconf/lustre-version.ac.
5  * Changes made directly to this file will be lost. */
6
7 #define LUSTRE_MAJOR @AC_LUSTRE_MAJOR@
8 #define LUSTRE_MINOR @AC_LUSTRE_MINOR@
9 #define LUSTRE_PATCH @AC_LUSTRE_PATCH@
10 #define LUSTRE_FIX @AC_LUSTRE_FIX@
11 #define LUSTRE_VERSION_STRING "@AC_LUSTRE_VERSION_STRING@"
12
13 #define OBD_OCD_VERSION(major, minor, patch, fix)                       \
14         (((major) << 24) + ((minor) << 16) + ((patch) << 8) + (fix))
15
16 #define OBD_OCD_VERSION_MAJOR(version)  ((int)((version) >> 24) & 255)
17 #define OBD_OCD_VERSION_MINOR(version)  ((int)((version) >> 16) & 255)
18 #define OBD_OCD_VERSION_PATCH(version)  ((int)((version) >>  8) & 255)
19 #define OBD_OCD_VERSION_FIX(version)    ((int)((version) >>  0) & 255)
20
21 #define LUSTRE_VERSION_CODE                                             \
22         OBD_OCD_VERSION(LUSTRE_MAJOR, LUSTRE_MINOR, LUSTRE_PATCH, LUSTRE_FIX)
23
24 /* liblustre clients are only allowed to connect if their LUSTRE_FIX mismatches
25  * by this amount (set in lustre/autoconf/lustre-version.ac). */
26 #define LUSTRE_VERSION_ALLOWED_OFFSET @AC_LUSTRE_VER_ALLOWED_OFFSET@
27
28 #ifdef __KERNEL__
29 /* If lustre version of client and servers it connects to differs by more
30  * than this amount, client would issue a warning.
31  * (set in lustre/autoconf/lustre-version.ac) */
32 #define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_CLI_VER_OFFSET_WARN@
33 #else
34 /* If liblustre version of client and servers it connects to differs by more
35  * than this amount, client would issue a warning.
36  * (set in lustre/autoconf/lustre-version.ac) */
37 #define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_LIB_VER_OFFSET_WARN@
38 #endif
39
40 #endif