1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * Object Devices Class Driver
6 * Copyright (C) 2001-2003 Cluster File Systems, Inc.
8 * This file is part of Lustre, http://www.lustre.org.
10 * Lustre is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation.
14 * Lustre is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with Lustre; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * These are the only exported functions, they provide some generic
24 * infrastructure for managing object devices
28 #include <linux/config.h> /* for CONFIG_PROC_FS */
29 #include <linux/module.h>
30 #include <linux/errno.h>
31 #include <linux/kernel.h>
32 #include <linux/major.h>
33 #include <linux/sched.h>
35 #include <linux/slab.h>
36 #include <linux/ioport.h>
37 #include <linux/fcntl.h>
38 #include <linux/delay.h>
39 #include <linux/skbuff.h>
40 #include <linux/proc_fs.h>
42 #include <linux/poll.h>
43 #include <linux/init.h>
44 #include <linux/list.h>
45 #include <linux/highmem.h>
47 #include <asm/ioctls.h>
48 #include <asm/system.h>
50 #include <asm/uaccess.h>
51 #include <linux/miscdevice.h>
53 #define DEBUG_SUBSYSTEM S_CLASS
55 #include <linux/obd_support.h>
56 #include <linux/obd_class.h>
57 #include <linux/lustre_debug.h>
58 #include <linux/smp_lock.h>
59 #include <linux/lprocfs_status.h>
60 #include <portals/lib-types.h> /* for PTL_MD_MAX_IOV */
61 #include <linux/lustre_build_version.h>
63 struct semaphore obd_conf_sem; /* serialize configuration commands */
64 struct obd_device obd_dev[MAX_OBD_DEVICES];
65 struct list_head obd_types;
69 /* Root for /proc/lustre */
70 struct proc_dir_entry *proc_lustre_root = NULL;
72 /* The following are visible and mutable through /proc/sys/lustre/. */
73 unsigned long obd_fail_loc;
74 unsigned long obd_timeout = 100;
75 char obd_recovery_upcall[128] = "/usr/lib/lustre/ha_assist";
76 unsigned long obd_sync_filter; /* = 0, don't sync by default */
78 /* opening /dev/obd */
79 static int obd_class_open(struct inode * inode, struct file * file)
81 struct obd_class_user_state *ocus;
84 OBD_ALLOC (ocus, sizeof (*ocus));
88 INIT_LIST_HEAD (&ocus->ocus_conns);
89 ocus->ocus_current_obd = NULL;
90 file->private_data = ocus;
97 obd_class_add_user_conn (struct obd_class_user_state *ocus,
98 struct lustre_handle *conn)
100 struct obd_class_user_conn *c;
102 /* NB holding obd_conf_sem */
104 OBD_ALLOC (c, sizeof (*c));
108 c->ocuc_conn = *conn;
109 list_add (&c->ocuc_chain, &ocus->ocus_conns);
114 obd_class_remove_user_conn (struct obd_class_user_state *ocus,
115 struct lustre_handle *conn)
118 struct obd_class_user_conn *c;
120 /* NB holding obd_conf_sem or last reference */
122 list_for_each (e, &ocus->ocus_conns) {
123 c = list_entry (e, struct obd_class_user_conn, ocuc_chain);
124 if (!memcmp (conn, &c->ocuc_conn, sizeof (*conn))) {
125 list_del (&c->ocuc_chain);
126 OBD_FREE (c, sizeof (*c));
132 /* closing /dev/obd */
133 static int obd_class_release(struct inode * inode, struct file * file)
135 struct obd_class_user_state *ocus = file->private_data;
136 struct obd_class_user_conn *c;
139 while (!list_empty (&ocus->ocus_conns)) {
140 c = list_entry (ocus->ocus_conns.next,
141 struct obd_class_user_conn, ocuc_chain);
142 list_del (&c->ocuc_chain);
144 CDEBUG (D_IOCTL, "Auto-disconnect %p\n", &c->ocuc_conn);
146 down (&obd_conf_sem);
147 obd_disconnect (&c->ocuc_conn);
150 OBD_FREE (c, sizeof (*c));
153 OBD_FREE (ocus, sizeof (*ocus));
159 static inline void obd_data2conn(struct lustre_handle *conn,
160 struct obd_ioctl_data *data)
162 conn->addr = data->ioc_addr;
163 conn->cookie = data->ioc_cookie;
166 static inline void obd_conn2data(struct obd_ioctl_data *data,
167 struct lustre_handle *conn)
169 data->ioc_addr = conn->addr;
170 data->ioc_cookie = conn->cookie;
173 static void forcibly_detach_exports(struct obd_device *obd)
176 struct list_head *tmp, *n;
177 struct lustre_handle fake_conn;
179 CDEBUG(D_IOCTL, "OBD device %d (%p) has exports, "
180 "disconnecting them", obd->obd_minor, obd);
181 list_for_each_safe(tmp, n, &obd->obd_exports) {
182 struct obd_export *exp = list_entry(tmp, struct obd_export,
184 fake_conn.addr = (__u64)(unsigned long)exp;
185 fake_conn.cookie = exp->exp_cookie;
186 rc = obd_disconnect(&fake_conn);
188 CDEBUG(D_IOCTL, "disconnecting export %p failed: %d\n",
191 CDEBUG(D_IOCTL, "export %p disconnected\n", exp);
196 /* to control /dev/obd */
197 static int obd_class_ioctl (struct inode * inode, struct file * filp,
198 unsigned int cmd, unsigned long arg)
201 struct obd_ioctl_data *data;
202 struct obd_class_user_state *ocus = filp->private_data;
203 struct obd_device *obd = ocus->ocus_current_obd;
204 struct lustre_handle conn;
205 int err = 0, len = 0, serialised = 0;
209 case OBD_IOC_BRW_WRITE:
210 case OBD_IOC_BRW_READ:
211 case OBD_IOC_GETATTR:
212 case ECHO_IOC_ENQUEUE:
213 case ECHO_IOC_CANCEL:
221 if (!obd && cmd != OBD_IOC_DEVICE && cmd != TCGETS &&
222 cmd != OBD_IOC_LIST && cmd != OBD_GET_VERSION &&
223 cmd != OBD_IOC_NAME2DEV && cmd != OBD_IOC_NEWDEV) {
224 CERROR("OBD ioctl: No device\n");
225 GOTO(out, err = -EINVAL);
227 if (obd_ioctl_getdata(&buf, &len, (void *)arg)) {
228 CERROR("OBD ioctl: data error\n");
229 GOTO(out, err = -EINVAL);
231 data = (struct obd_ioctl_data *)buf;
235 GOTO(out, err=-EINVAL);
236 case OBD_IOC_DEVICE: {
237 CDEBUG(D_IOCTL, "\n");
238 if (data->ioc_dev >= MAX_OBD_DEVICES || data->ioc_dev < 0) {
239 CERROR("OBD ioctl: DEVICE insufficient devices\n");
240 GOTO(out, err=-EINVAL);
242 CDEBUG(D_IOCTL, "device %d\n", data->ioc_dev);
244 ocus->ocus_current_obd = &obd_dev[data->ioc_dev];
250 char *buf2 = data->ioc_bulk;
251 int remains = data->ioc_inllen1;
253 if (!data->ioc_inlbuf1) {
254 CERROR("No buffer passed!\n");
255 GOTO(out, err=-EINVAL);
259 for (i = 0 ; i < MAX_OBD_DEVICES ; i++) {
262 struct obd_device *obd = &obd_dev[i];
265 if (obd->obd_flags & OBD_SET_UP)
267 else if (obd->obd_flags & OBD_ATTACHED)
271 l = snprintf(buf2, remains, "%2d %s %s %s %s %d\n",
272 i, status, obd->obd_type->typ_name,
273 obd->obd_name, obd->obd_uuid.uuid, obd->obd_type->typ_refcnt);
277 CERROR("not enough space for device listing\n");
282 err = copy_to_user((void *)arg, data, len);
288 case OBD_GET_VERSION:
289 if (!data->ioc_inlbuf1) {
290 CERROR("No buffer passed in ioctl\n");
291 GOTO(out, err = -EINVAL);
294 if (strlen(BUILD_VERSION) + 1 > data->ioc_inllen1) {
295 CERROR("ioctl buffer too small to hold version\n");
296 GOTO(out, err = -EINVAL);
299 memcpy(data->ioc_bulk, BUILD_VERSION,
300 strlen(BUILD_VERSION) + 1);
302 err = copy_to_user((void *)arg, data, len);
307 case OBD_IOC_NAME2DEV: {
308 /* Resolve a device name. This does not change the
309 * currently selected device.
313 if (!data->ioc_inllen1 || !data->ioc_inlbuf1 ) {
314 CERROR("No name passed,!\n");
315 GOTO(out, err=-EINVAL);
317 if (data->ioc_inlbuf1[data->ioc_inllen1-1] !=0) {
318 CERROR("Name not nul terminated!\n");
319 GOTO(out, err=-EINVAL);
322 CDEBUG(D_IOCTL, "device name %s\n", data->ioc_inlbuf1);
323 dev = class_name2dev(data->ioc_inlbuf1);
326 CDEBUG(D_IOCTL, "No device for name %s!\n",
328 GOTO(out, err=-EINVAL);
331 CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1,
333 err = copy_to_user((void *)arg, data, sizeof(*data));
339 case OBD_IOC_UUID2DEV: {
340 /* Resolve a device uuid. This does not change the
341 * currently selected device.
344 struct obd_uuid uuid;
346 if (!data->ioc_inllen1 || !data->ioc_inlbuf1) {
347 CERROR("No UUID passed!\n");
348 GOTO(out, err=-EINVAL);
350 if (data->ioc_inlbuf1[data->ioc_inllen1-1] !=0) {
351 CERROR("Name not nul terminated!\n");
352 GOTO(out, err=-EINVAL);
355 CDEBUG(D_IOCTL, "device name %s\n", data->ioc_inlbuf1);
356 obd_str2uuid(&uuid, data->ioc_inlbuf1);
357 dev = class_uuid2dev(&uuid);
360 CDEBUG(D_IOCTL, "No device for name %s!\n",
362 GOTO(out, err=-EINVAL);
365 CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1,
367 err = copy_to_user((void *)arg, data, sizeof(*data));
373 case OBD_IOC_NEWDEV: {
377 ocus->ocus_current_obd = NULL;
378 for (i = 0 ; i < MAX_OBD_DEVICES ; i++) {
379 struct obd_device *obd = &obd_dev[i];
380 if (!obd->obd_type) {
381 ocus->ocus_current_obd = obd;
390 GOTO(out, err=-EINVAL);
392 err = copy_to_user((void *)arg, data, sizeof(*data));
398 case OBD_IOC_ATTACH: {
399 struct obd_type *type;
402 /* have we attached a type to this device */
403 if (obd->obd_flags & OBD_ATTACHED || obd->obd_type) {
404 CERROR("OBD: Device %d already typed as %s.\n",
405 obd->obd_minor, MKSTR(obd->obd_type->typ_name));
406 GOTO(out, err = -EBUSY);
409 if (!data->ioc_inllen1 || !data->ioc_inlbuf1) {
410 CERROR("No type passed!\n");
411 GOTO(out, err = -EINVAL);
413 if (data->ioc_inlbuf1[data->ioc_inllen1-1] !=0) {
414 CERROR("Type not nul terminated!\n");
415 GOTO(out, err = -EINVAL);
418 CDEBUG(D_IOCTL, "attach type %s name: %s uuid: %s\n",
419 MKSTR(data->ioc_inlbuf1),
420 MKSTR(data->ioc_inlbuf2), MKSTR(data->ioc_inlbuf3));
423 type = class_get_type(data->ioc_inlbuf1);
425 CERROR("OBD: unknown type dev %d\n", obd->obd_minor);
426 GOTO(out, err = -EINVAL);
429 minor = obd->obd_minor;
430 memset(obd, 0, sizeof(*obd));
431 obd->obd_minor = minor;
432 obd->obd_type = type;
433 INIT_LIST_HEAD(&obd->obd_exports);
434 INIT_LIST_HEAD(&obd->obd_imports);
435 spin_lock_init(&obd->obd_dev_lock);
437 if (data->ioc_inlbuf2) {
438 int len = strlen(data->ioc_inlbuf2) + 1;
439 OBD_ALLOC(obd->obd_name, len);
440 if (!obd->obd_name) {
441 class_put_type(obd->obd_type);
442 obd->obd_type = NULL;
443 GOTO(out, err = -ENOMEM);
445 memcpy(obd->obd_name, data->ioc_inlbuf2, len);
447 CERROR("WARNING: unnamed obd device\n");
449 if (data->ioc_inlbuf3) {
450 int len = strlen(data->ioc_inlbuf3);
451 if (len >= sizeof(obd->obd_uuid)) {
452 CERROR("uuid must be < "LPSZ" bytes long\n",
453 sizeof(obd->obd_uuid));
455 OBD_FREE(obd->obd_name,
456 strlen(obd->obd_name) + 1);
457 class_put_type(obd->obd_type);
458 obd->obd_type = NULL;
459 GOTO(out, err=-EINVAL);
461 memcpy(obd->obd_uuid.uuid, data->ioc_inlbuf3, len);
464 if (OBP(obd, attach))
465 err = OBP(obd,attach)(obd, sizeof(*data), data);
467 if(data->ioc_inlbuf2)
468 OBD_FREE(obd->obd_name, strlen(obd->obd_name)+1);
469 class_put_type(obd->obd_type);
470 obd->obd_type = NULL;
472 obd->obd_flags |= OBD_ATTACHED;
475 CDEBUG(D_IOCTL, "OBD: dev %d attached type %s\n",
476 obd->obd_minor, data->ioc_inlbuf1);
482 case OBD_IOC_DETACH: {
484 if (obd->obd_flags & OBD_SET_UP) {
485 CERROR("OBD device %d still set up\n", obd->obd_minor);
486 GOTO(out, err=-EBUSY);
488 if (!(obd->obd_flags & OBD_ATTACHED) ) {
489 CERROR("OBD device %d not attached\n", obd->obd_minor);
490 GOTO(out, err=-ENODEV);
492 if (OBP(obd, detach))
493 err = OBP(obd,detach)(obd);
496 OBD_FREE(obd->obd_name, strlen(obd->obd_name)+1);
497 obd->obd_name = NULL;
500 obd->obd_flags &= ~OBD_ATTACHED;
501 obd->obd_type->typ_refcnt--;
502 class_put_type(obd->obd_type);
503 obd->obd_type = NULL;
507 case OBD_IOC_SETUP: {
508 /* have we attached a type to this device? */
509 if (!(obd->obd_flags & OBD_ATTACHED)) {
510 CERROR("Device %d not attached\n", obd->obd_minor);
511 GOTO(out, err=-ENODEV);
514 /* has this been done already? */
515 if ( obd->obd_flags & OBD_SET_UP ) {
516 CERROR("Device %d already setup (type %s)\n",
517 obd->obd_minor, obd->obd_type->typ_name);
518 GOTO(out, err=-EBUSY);
521 if ( OBT(obd) && OBP(obd, setup) )
522 err = obd_setup(obd, sizeof(*data), data);
525 obd->obd_type->typ_refcnt++;
526 obd->obd_flags |= OBD_SET_UP;
531 case OBD_IOC_CLEANUP: {
532 /* have we attached a type to this device? */
533 if (!(obd->obd_flags & OBD_ATTACHED)) {
534 CERROR("Device %d not attached\n", obd->obd_minor);
535 GOTO(out, err=-ENODEV);
537 if (!list_empty(&obd->obd_exports)) {
538 if (!data->ioc_inlbuf1 || data->ioc_inlbuf1[0] != 'F') {
539 CERROR("OBD device %d (%p) has exports\n",
540 obd->obd_minor, obd);
541 GOTO(out, err = -EBUSY);
543 forcibly_detach_exports(obd);
545 if (OBT(obd) && OBP(obd, cleanup))
546 err = obd_cleanup(obd);
549 obd->obd_flags &= ~OBD_SET_UP;
550 obd->obd_type->typ_refcnt--;
555 case OBD_IOC_CONNECT: {
556 struct obd_uuid cluuid = { "OBD_CLASS_UUID" };
557 obd_data2conn(&conn, data);
559 err = obd_connect(&conn, obd, &cluuid, NULL, NULL);
561 CDEBUG(D_IOCTL, "assigned export "LPX64"\n", conn.addr);
562 obd_conn2data(data, &conn);
566 err = obd_class_add_user_conn (ocus, &conn);
568 obd_disconnect (&conn);
572 err = copy_to_user((void *)arg, data, sizeof(*data));
574 obd_class_remove_user_conn (ocus, &conn);
575 obd_disconnect (&conn);
576 GOTO (out, err=-EFAULT);
581 case OBD_IOC_DISCONNECT: {
582 obd_data2conn(&conn, data);
583 obd_class_remove_user_conn (ocus, &conn);
584 err = obd_disconnect(&conn);
588 case OBD_IOC_NO_TRANSNO: {
589 if (!(obd->obd_flags & OBD_ATTACHED)) {
590 CERROR("Device %d not attached\n", obd->obd_minor);
591 GOTO(out, err=-ENODEV);
594 "disabling committed-transno notifications on %d\n",
596 obd->obd_flags |= OBD_NO_TRANSNO;
601 obd_data2conn(&conn, data);
603 err = obd_iocontrol(cmd, &conn, len, data, NULL);
607 err = copy_to_user((void *)arg, data, len);
619 } /* obd_class_ioctl */
623 /* declare character device */
624 static struct file_operations obd_psdev_fops = {
625 ioctl: obd_class_ioctl, /* ioctl */
626 open: obd_class_open, /* open */
627 release: obd_class_release, /* release */
631 #define OBD_MINOR 241
632 static struct miscdevice obd_psdev = {
638 void (*class_signal_connection_failure)(struct ptlrpc_connection *);
640 #ifdef CONFIG_HIGHMEM
641 /* Allow at most 3/4 of the kmap mappings to be consumed by vector I/O
642 * requests. This avoids deadlocks on servers which have a lot of clients
643 * doing vector I/O. We don't need to do this for non-vector I/O requests
644 * because singleton requests will just block on the kmap itself and never
645 * deadlock waiting for additional kmaps to complete.
647 * If we are a "server" task, we can have at most a single reservation
648 * in excess of the maximum. This avoids a deadlock when multiple client
649 * threads are on the same machine as the server threads, and the clients
650 * have consumed all of the available mappings. As long as a single server
651 * thread is can make progress, we are guaranteed to avoid deadlock.
653 #define OBD_KMAP_MAX (LAST_PKMAP * 3 / 4)
654 static atomic_t obd_kmap_count = ATOMIC_INIT(OBD_KMAP_MAX);
655 static DECLARE_WAIT_QUEUE_HEAD(obd_kmap_waitq);
657 void obd_kmap_get(int count, int server)
659 //CERROR("getting %d kmap counts (%d/%d)\n", count,
660 // atomic_read(&obd_kmap_count), OBD_KMAP_MAX);
662 atomic_dec(&obd_kmap_count);
663 else while (atomic_add_negative(-count, &obd_kmap_count)) {
664 static long next_show = 0;
665 static int skipped = 0;
667 if (server && atomic_read(&obd_kmap_count) >= -PTL_MD_MAX_IOV)
670 CDEBUG(D_OTHER, "negative kmap reserved count: %d\n",
671 atomic_read(&obd_kmap_count));
672 atomic_add(count, &obd_kmap_count);
674 if (time_after(jiffies, next_show)) {
675 CERROR("blocking %s (and %d others) for kmaps\n",
676 current->comm, skipped);
677 next_show = jiffies + 5*HZ;
681 wait_event(obd_kmap_waitq,
682 atomic_read(&obd_kmap_count) >= count);
686 void obd_kmap_put(int count)
688 atomic_add(count, &obd_kmap_count);
689 /* Wake up sleepers. Sadly, this wakes up all of the tasks at once.
690 * We could have something smarter here like:
691 while (atomic_read(&obd_kmap_count) > 0)
692 wake_up_nr(obd_kmap_waitq, 1);
693 although we would need to set somewhere (probably obd_class_init):
694 obd_kmap_waitq.flags |= WQ_FLAG_EXCLUSIVE;
695 For now the wait_event() condition will handle this OK I believe.
697 if (atomic_read(&obd_kmap_count) > 0)
698 wake_up(&obd_kmap_waitq);
701 EXPORT_SYMBOL(obd_kmap_get);
702 EXPORT_SYMBOL(obd_kmap_put);
705 EXPORT_SYMBOL(obd_dev);
706 EXPORT_SYMBOL(obdo_cachep);
707 EXPORT_SYMBOL(obd_memory);
708 EXPORT_SYMBOL(obd_memmax);
709 EXPORT_SYMBOL(obd_fail_loc);
710 EXPORT_SYMBOL(obd_timeout);
711 EXPORT_SYMBOL(obd_recovery_upcall);
712 EXPORT_SYMBOL(obd_sync_filter);
713 EXPORT_SYMBOL(ptlrpc_put_connection_superhack);
714 EXPORT_SYMBOL(ptlrpc_abort_inflight_superhack);
715 EXPORT_SYMBOL(proc_lustre_root);
717 EXPORT_SYMBOL(class_register_type);
718 EXPORT_SYMBOL(class_unregister_type);
719 EXPORT_SYMBOL(class_get_type);
720 EXPORT_SYMBOL(class_put_type);
721 EXPORT_SYMBOL(class_name2dev);
722 EXPORT_SYMBOL(class_uuid2dev);
723 EXPORT_SYMBOL(class_uuid2obd);
724 EXPORT_SYMBOL(class_new_export);
725 EXPORT_SYMBOL(class_destroy_export);
726 EXPORT_SYMBOL(class_connect);
727 EXPORT_SYMBOL(class_conn2export);
728 EXPORT_SYMBOL(class_conn2obd);
729 EXPORT_SYMBOL(class_conn2cliimp);
730 EXPORT_SYMBOL(class_conn2ldlmimp);
731 EXPORT_SYMBOL(class_disconnect);
732 EXPORT_SYMBOL(class_disconnect_all);
733 EXPORT_SYMBOL(class_uuid_unparse);
735 EXPORT_SYMBOL(class_signal_connection_failure);
737 static int __init init_obdclass(void)
739 struct obd_device *obd;
743 printk(KERN_INFO "OBD class driver Build Version: " BUILD_VERSION
744 ", info@clusterfs.com\n");
746 sema_init(&obd_conf_sem, 1);
747 INIT_LIST_HEAD(&obd_types);
749 if ((err = misc_register(&obd_psdev))) {
750 CERROR("cannot register %d err %d\n", OBD_MINOR, err);
754 /* This struct is already zerod for us (static global) */
755 for (i = 0, obd = obd_dev; i < MAX_OBD_DEVICES; i++, obd++)
758 err = obd_init_caches();
765 proc_lustre_root = proc_mkdir("lustre", proc_root_fs);
766 if (!proc_lustre_root)
767 printk(KERN_ERR "error registering /proc/fs/lustre\n");
769 proc_lustre_root = NULL;
774 static void __exit cleanup_obdclass(void)
779 misc_deregister(&obd_psdev);
780 for (i = 0; i < MAX_OBD_DEVICES; i++) {
781 struct obd_device *obd = &obd_dev[i];
782 if (obd->obd_type && (obd->obd_flags & OBD_SET_UP) &&
783 OBT(obd) && OBP(obd, detach)) {
784 /* XXX should this call generic detach otherwise? */
785 OBP(obd, detach)(obd);
789 obd_cleanup_caches();
792 if (proc_lustre_root) {
793 lprocfs_remove(proc_lustre_root);
794 proc_lustre_root = NULL;
797 CERROR("obd mem max: %d leaked: %d\n", obd_memmax,
798 atomic_read(&obd_memory));
802 /* Check that we're building against the appropriate version of the Lustre
804 #include <linux/lustre_version.h>
805 #define LUSTRE_SOURCE_VERSION 10
806 #if (LUSTRE_KERNEL_VERSION < LUSTRE_SOURCE_VERSION)
807 # error Cannot continue: Your Lustre kernel patch is older than the sources
808 #elif (LUSTRE_KERNEL_VERSION > 11)
809 # error Cannot continue: Your Lustre sources are older than the kernel patch
812 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
813 MODULE_DESCRIPTION("Lustre Class Driver Build Version: " BUILD_VERSION);
814 MODULE_LICENSE("GPL");
816 module_init(init_obdclass);
817 module_exit(cleanup_obdclass);