Whamcloud - gitweb
Land b_smallfix onto HEAD (20040512_1806)
[fs/lustre-release.git] / lustre / obdclass / class_obd.c
index 09bf499..c6404c4 100644 (file)
@@ -65,6 +65,7 @@
 #include <linux/lprocfs_status.h>
 #ifdef __KERNEL__
 #include <linux/lustre_build_version.h>
+#include <linux/lustre_version.h>
 #endif
 #include <portals/list.h>
 
@@ -447,6 +448,13 @@ int obd_proc_read_version(char *page, char **start, off_t off, int count,
         return snprintf(page, count, "%s\n", BUILD_VERSION);
 }
 
+int obd_proc_read_kernel_version(char *page, char **start, off_t off, int count,
+                                 int *eof, void *data)
+{
+        *eof = 1;
+        return snprintf(page, count, "%u\n", LUSTRE_KERNEL_VERSION);
+}
+
 int obd_proc_read_pinger(char *page, char **start, off_t off, int count,
                          int *eof, void *data)
 {
@@ -464,6 +472,7 @@ int obd_proc_read_pinger(char *page, char **start, off_t off, int count,
 struct proc_dir_entry *proc_lustre_root = NULL;
 struct lprocfs_vars lprocfs_base[] = {
         { "version", obd_proc_read_version, NULL, NULL },
+        { "kernel_version", obd_proc_read_kernel_version, NULL, NULL },
         { "pinger", obd_proc_read_pinger, NULL, NULL },
         { 0 }
 };
@@ -645,8 +654,8 @@ static void cleanup_obdclass(void)
 /* Check that we're building against the appropriate version of the Lustre
  * kernel patch */
 #include <linux/lustre_version.h>
-#define LUSTRE_MIN_VERSION 28
-#define LUSTRE_MAX_VERSION 35
+#define LUSTRE_MIN_VERSION 32
+#define LUSTRE_MAX_VERSION 36
 #if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION)
 # error Cannot continue: Your Lustre kernel patch is older than the sources
 #elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION)