Whamcloud - gitweb
Land b_hd_capa onto HEAD (20050809_1942)
[fs/lustre-release.git] / lustre / obdclass / class_obd.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  * Object Devices Class Driver
5  *
6  *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
7  *
8  *   This file is part of Lustre, http://www.lustre.org.
9  *
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.
13  *
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.
18  *
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.
22  *
23  * These are the only exported functions, they provide some generic
24  * infrastructure for managing object devices
25  */
26
27 #define DEBUG_SUBSYSTEM S_CLASS
28 #ifndef EXPORT_SYMTAB
29 # define EXPORT_SYMTAB
30 #endif
31 #ifdef __KERNEL__
32 #include <linux/config.h> /* for CONFIG_PROC_FS */
33 #include <linux/module.h>
34 #include <linux/errno.h>
35 #include <linux/kernel.h>
36 #include <linux/major.h>
37 #include <linux/sched.h>
38 #include <linux/lp.h>
39 #include <linux/slab.h>
40 #include <linux/ioport.h>
41 #include <linux/fcntl.h>
42 #include <linux/delay.h>
43 #include <linux/skbuff.h>
44 #include <linux/proc_fs.h>
45 #include <linux/fs.h>
46 #include <linux/poll.h>
47 #include <linux/init.h>
48 #include <linux/list.h>
49 #include <linux/highmem.h>
50 #include <asm/io.h>
51 #include <asm/ioctls.h>
52 #include <asm/system.h>
53 #include <asm/poll.h>
54 #include <asm/uaccess.h>
55 #include <linux/miscdevice.h>
56 #include <linux/smp_lock.h>
57 #include <linux/seq_file.h>
58 #else
59 # include <liblustre.h>
60 #endif
61
62 #include <linux/obd_support.h>
63 #include <linux/obd_class.h>
64 #include <linux/lustre_debug.h>
65 #include <linux/lprocfs_status.h>
66 #ifdef __KERNEL__
67 #include <linux/lustre_build_version.h>
68 #include <linux/lustre_version.h>
69 #endif
70 #include <libcfs/list.h>
71
72 #ifndef __KERNEL__
73 /* liblustre workaround */
74 atomic_t portal_kmemory = {0};
75 #endif
76
77 struct obd_device obd_dev[MAX_OBD_DEVICES];
78 struct list_head obd_types;
79 spinlock_t obd_dev_lock;
80 #ifndef __KERNEL__
81 atomic_t obd_memory;
82 int obd_memmax;
83 #endif
84
85 int proc_version;
86
87 /* The following are visible and mutable through /proc/sys/lustre/. */
88 unsigned int obd_fail_loc;
89 unsigned int obd_dump_on_timeout;
90 unsigned int obd_timeout = 100;
91 unsigned int ldlm_timeout = 6;
92 char obd_lustre_upcall[128] = "DEFAULT"; /* or NONE or /full/path/to/upcall  */
93 unsigned int obd_sync_filter = 1; /* = 1, sync by default */
94
95 DECLARE_WAIT_QUEUE_HEAD(obd_race_waitq);
96
97 #ifdef __KERNEL__
98
99 unsigned int obd_print_fail_loc(void)
100 {
101         CWARN("obd_fail_loc = %x\n", obd_fail_loc);
102         return obd_fail_loc;
103 }
104
105 /*  opening /dev/obd */
106 static int obd_class_open(struct inode * inode, struct file * file)
107 {
108         ENTRY;
109
110         PORTAL_MODULE_USE;
111         RETURN(0);
112 }
113
114 /*  closing /dev/obd */
115 static int obd_class_release(struct inode * inode, struct file * file)
116 {
117         ENTRY;
118
119         PORTAL_MODULE_UNUSE;
120         RETURN(0);
121 }
122 #endif
123
124 static inline void obd_data2conn(struct lustre_handle *conn,
125                                  struct obd_ioctl_data *data)
126 {
127         memset(conn, 0, sizeof *conn);
128         conn->cookie = data->ioc_cookie;
129 }
130
131 static inline void obd_conn2data(struct obd_ioctl_data *data,
132                                  struct lustre_handle *conn)
133 {
134         data->ioc_cookie = conn->cookie;
135 }
136
137 int class_resolve_dev_name(uint32_t len, char *name)
138 {
139         int rc;
140         int dev;
141
142         if (!len || !name) {
143                 CERROR("No name passed,!\n");
144                 GOTO(out, rc = -EINVAL);
145         }
146         if (name[len - 1] != 0) {
147                 CERROR("Name not nul terminated!\n");
148                 GOTO(out, rc = -EINVAL);
149         }
150
151         CDEBUG(D_IOCTL, "device name %s\n", name);
152         dev = class_name2dev(name);
153         if (dev == -1) {
154                 CDEBUG(D_IOCTL, "No device for name %s!\n", name);
155                 GOTO(out, rc = -EINVAL);
156         }
157
158         CDEBUG(D_IOCTL, "device name %s, dev %d\n", name, dev);
159         rc = dev;
160
161 out:
162         RETURN(rc);
163 }
164
165 int class_handle_ioctl(unsigned int cmd, unsigned long arg)
166 {
167         char *buf = NULL;
168         struct obd_ioctl_data *data;
169         struct portals_debug_ioctl_data *debug_data;
170         struct obd_device *obd = NULL;
171         int err = 0, len = 0;
172         ENTRY;
173
174         if (current->fsuid != 0)
175                 RETURN(err = -EACCES);
176
177         if ((cmd & 0xffffff00) == ((int)'T') << 8) /* ignore all tty ioctls */
178                 RETURN(err = -ENOTTY);
179
180         /* only for debugging */
181         if (cmd == PTL_IOC_DEBUG_MASK) {
182                 debug_data = (struct portals_debug_ioctl_data*)arg;
183                 portal_subsystem_debug = debug_data->subs;
184                 portal_debug = debug_data->debug;
185                 return 0;
186         }
187
188         CDEBUG(D_IOCTL, "cmd = %x, obd = %p\n", cmd, obd);
189         if (obd_ioctl_getdata(&buf, &len, (void *)arg)) {
190                 CERROR("OBD ioctl: data error\n");
191                 GOTO(out, err = -EINVAL);
192         }
193         data = (struct obd_ioctl_data *)buf;
194
195         switch (cmd) {
196         case OBD_IOC_PROCESS_CFG: {
197                 struct lustre_cfg *lcfg;
198
199                 if (!data->ioc_plen1 || !data->ioc_pbuf1) {
200                         CERROR("No config buffer passed!\n");
201                         GOTO(out, err = -EINVAL);
202                 }
203
204                 err = lustre_cfg_sanity_check(data->ioc_pbuf1,
205                                               data->ioc_plen1);
206                 if (err)
207                         GOTO(out, err);
208
209                 OBD_ALLOC(lcfg, data->ioc_plen1);
210                 err = copy_from_user(lcfg, data->ioc_pbuf1, data->ioc_plen1);
211                 if (!err)
212                         err = class_process_config(lcfg);
213                 OBD_FREE(lcfg, data->ioc_plen1);
214                 GOTO(out, err);
215         }
216         
217         case OBD_GET_VERSION:
218                 if (!data->ioc_inlbuf1) {
219                         CERROR("No buffer passed in ioctl\n");
220                         GOTO(out, err = -EINVAL);
221                 }
222
223                 if (strlen(BUILD_VERSION) + 1 > data->ioc_inllen1) {
224                         CERROR("ioctl buffer too small to hold version\n");
225                         GOTO(out, err = -EINVAL);
226                 }
227
228                 memcpy(data->ioc_bulk, BUILD_VERSION,
229                        strlen(BUILD_VERSION) + 1);
230
231                 err = copy_to_user((void *)arg, data, len);
232                 if (err)
233                         err = -EFAULT;
234                 GOTO(out, err);
235
236         case OBD_IOC_NAME2DEV: {
237                 /* Resolve a device name.  This does not change the
238                  * currently selected device.
239                  */
240                 int dev;
241
242                 dev = class_resolve_dev_name(data->ioc_inllen1,
243                                              data->ioc_inlbuf1);
244                 data->ioc_dev = dev;
245                 if (dev < 0)
246                         GOTO(out, err = -EINVAL);
247
248                 err = copy_to_user((void *)arg, data, sizeof(*data));
249                 if (err)
250                         err = -EFAULT;
251                 GOTO(out, err);
252         }
253
254         case OBD_IOC_UUID2DEV: {
255                 /* Resolve a device uuid.  This does not change the
256                  * currently selected device.
257                  */
258                 int dev;
259                 struct obd_uuid uuid;
260
261                 if (!data->ioc_inllen1 || !data->ioc_inlbuf1) {
262                         CERROR("No UUID passed!\n");
263                         GOTO(out, err = -EINVAL);
264                 }
265                 if (data->ioc_inlbuf1[data->ioc_inllen1 - 1] != 0) {
266                         CERROR("UUID not NUL terminated!\n");
267                         GOTO(out, err = -EINVAL);
268                 }
269
270                 CDEBUG(D_IOCTL, "device name %s\n", data->ioc_inlbuf1);
271                 obd_str2uuid(&uuid, data->ioc_inlbuf1);
272                 dev = class_uuid2dev(&uuid);
273                 data->ioc_dev = dev;
274                 if (dev == -1) {
275                         CDEBUG(D_IOCTL, "No device for UUID %s!\n",
276                                data->ioc_inlbuf1);
277                         GOTO(out, err = -EINVAL);
278                 }
279
280                 CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1,
281                        dev);
282                 err = copy_to_user((void *)arg, data, sizeof(*data));
283                 if (err)
284                         err = -EFAULT;
285                 GOTO(out, err);
286         }
287
288
289         case OBD_IOC_CLOSE_UUID: {
290                 ptl_nid_t       peer_nid;
291                 __u32           peer_nal;
292                 CDEBUG(D_IOCTL, "closing all connections to uuid %s\n",
293                        data->ioc_inlbuf1);
294                 lustre_uuid_to_peer(data->ioc_inlbuf1, &peer_nal, &peer_nid);
295                 GOTO(out, err = 0);
296         }
297
298         }
299
300         if (data->ioc_dev >= MAX_OBD_DEVICES) {
301                 CERROR("OBD ioctl: No device\n");
302                 GOTO(out, err = -EINVAL);
303         } 
304         obd = &obd_dev[data->ioc_dev];
305         if (!(obd && obd->obd_set_up) || obd->obd_stopping) {
306                 CERROR("OBD ioctl: device not setup %d \n", data->ioc_dev);
307                 GOTO(out, err = -EINVAL);
308         }
309
310         switch(cmd) {
311         case OBD_IOC_NO_TRANSNO: {
312                 if (!obd->obd_attached) {
313                         CERROR("Device %d not attached\n", obd->obd_minor);
314                         GOTO(out, err = -ENODEV);
315                 }
316                 CDEBUG(D_IOCTL,
317                        "disabling committed-transno notifications on %d\n",
318                        obd->obd_minor);
319                 obd->obd_no_transno = 1;
320                 GOTO(out, err = 0);
321         }
322
323         default: {
324                 err = obd_iocontrol(cmd, obd->obd_self_export, len, data, NULL);
325                 if (err)
326                         GOTO(out, err);
327
328                 err = copy_to_user((void *)arg, data, len);
329                 if (err)
330                         err = -EFAULT;
331                 GOTO(out, err);
332         }
333         }
334
335  out:
336         if (buf)
337                 obd_ioctl_freedata(buf, len);
338         RETURN(err);
339 } /* class_handle_ioctl */
340
341
342
343 #define OBD_MINOR 241
344 #ifdef __KERNEL__
345 /* to control /dev/obd */
346 static int obd_class_ioctl(struct inode *inode, struct file *filp,
347                            unsigned int cmd, unsigned long arg)
348 {
349         return class_handle_ioctl(cmd, arg);
350 }
351
352 /* declare character device */
353 static struct file_operations obd_psdev_fops = {
354         .owner   = THIS_MODULE,
355         .ioctl   = obd_class_ioctl,     /* ioctl */
356         .open    = obd_class_open,      /* open */
357         .release = obd_class_release,   /* release */
358 };
359
360 /* modules setup */
361 static struct miscdevice obd_psdev = {
362         .minor = OBD_MINOR,
363         .name  = "obd_psdev",
364         .fops  = &obd_psdev_fops,
365 };
366 #else
367 void *obd_psdev = NULL;
368 #endif
369
370 EXPORT_SYMBOL(obd_dev);
371 EXPORT_SYMBOL(obdo_cachep);
372 EXPORT_SYMBOL(obd_fail_loc);
373 EXPORT_SYMBOL(obd_print_fail_loc);
374 EXPORT_SYMBOL(obd_race_waitq);
375 EXPORT_SYMBOL(obd_dump_on_timeout);
376 EXPORT_SYMBOL(ldlm_timeout);
377 EXPORT_SYMBOL(obd_timeout);
378 EXPORT_SYMBOL(obd_lustre_upcall);
379 EXPORT_SYMBOL(obd_sync_filter);
380 EXPORT_SYMBOL(ptlrpc_put_connection_superhack);
381 EXPORT_SYMBOL(ptlrpc_abort_inflight_superhack);
382 EXPORT_SYMBOL(proc_lustre_root);
383
384 EXPORT_SYMBOL(class_register_type);
385 EXPORT_SYMBOL(class_unregister_type);
386 EXPORT_SYMBOL(class_get_type);
387 EXPORT_SYMBOL(class_put_type);
388 EXPORT_SYMBOL(class_name2dev);
389 EXPORT_SYMBOL(class_name2obd);
390 EXPORT_SYMBOL(class_uuid2dev);
391 EXPORT_SYMBOL(class_uuid2obd);
392 EXPORT_SYMBOL(class_find_client_obd);
393 EXPORT_SYMBOL(class_devices_in_group);
394 EXPORT_SYMBOL(__class_export_put);
395 EXPORT_SYMBOL(class_new_export);
396 EXPORT_SYMBOL(class_unlink_export);
397 EXPORT_SYMBOL(class_import_get);
398 EXPORT_SYMBOL(class_import_put);
399 EXPORT_SYMBOL(class_new_import);
400 EXPORT_SYMBOL(class_destroy_import);
401 EXPORT_SYMBOL(class_connect);
402 EXPORT_SYMBOL(class_conn2export);
403 EXPORT_SYMBOL(class_exp2obd);
404 EXPORT_SYMBOL(class_conn2obd);
405 EXPORT_SYMBOL(class_exp2cliimp);
406 EXPORT_SYMBOL(class_conn2cliimp);
407 EXPORT_SYMBOL(class_disconnect);
408 EXPORT_SYMBOL(class_disconnect_exports);
409 EXPORT_SYMBOL(class_disconnect_stale_exports);
410
411 EXPORT_SYMBOL(oig_init);
412 EXPORT_SYMBOL(oig_release);
413 EXPORT_SYMBOL(oig_add_one);
414 EXPORT_SYMBOL(oig_wait);
415 EXPORT_SYMBOL(oig_complete_one);
416
417 /* uuid.c */
418 EXPORT_SYMBOL(class_uuid_unparse);
419 EXPORT_SYMBOL(lustre_uuid_to_peer);
420
421 EXPORT_SYMBOL(class_handle_hash);
422 EXPORT_SYMBOL(class_handle_unhash);
423 EXPORT_SYMBOL(class_handle2object);
424
425 /* config.c */
426 EXPORT_SYMBOL(class_get_profile);
427 EXPORT_SYMBOL(class_del_profile);
428 EXPORT_SYMBOL(class_process_config);
429 EXPORT_SYMBOL(class_config_process_llog);
430 EXPORT_SYMBOL(class_config_dump_llog);
431
432 /* mea.c */
433 EXPORT_SYMBOL(mea_name2idx);
434 EXPORT_SYMBOL(raw_name2idx);
435
436 #ifdef LPROCFS
437 int obd_proc_read_version(char *page, char **start, off_t off, int count,
438                           int *eof, void *data)
439 {
440         *eof = 1;
441         return snprintf(page, count, "%s\n", BUILD_VERSION);
442 }
443
444 int obd_proc_read_kernel_version(char *page, char **start, off_t off, int count,
445                                  int *eof, void *data)
446 {
447         *eof = 1;
448         return snprintf(page, count, "%u\n", LUSTRE_KERNEL_VERSION);
449 }
450
451 int obd_proc_read_pinger(char *page, char **start, off_t off, int count,
452                          int *eof, void *data)
453 {
454         *eof = 1;
455         return snprintf(page, count, "%s\n",
456 #ifdef ENABLE_PINGER
457                         "on"
458 #else
459                         "off"
460 #endif
461                        );
462 }
463
464 #if ENABLE_GSS
465 /* FIXME move these staff to proper place */
466 int (*lustre_secinit_downcall_handler)(const char *buffer,
467                                        long count) = NULL;
468 EXPORT_SYMBOL(lustre_secinit_downcall_handler);
469
470 int obd_proc_write_secinit(struct file *file, const char *buffer,
471                            unsigned long count, void *data)
472 {
473         int rc = 0;
474
475         if (lustre_secinit_downcall_handler) {
476                 rc = (*lustre_secinit_downcall_handler)((char *)buffer, count);
477                 if (rc) {
478                         LASSERT(rc < 0);
479                         return rc;
480                 }
481         }
482         return (int)count;
483 }
484 #endif
485
486 /* Root for /proc/fs/lustre */
487 struct proc_dir_entry *proc_lustre_root = NULL;
488 struct lprocfs_vars lprocfs_base[] = {
489         { "version", obd_proc_read_version, NULL, NULL },
490         { "kernel_version", obd_proc_read_kernel_version, NULL, NULL },
491         { "pinger", obd_proc_read_pinger, NULL, NULL },
492 #if ENABLE_GSS
493         { "secinit", NULL, obd_proc_write_secinit, NULL },
494 #endif
495         { 0 }
496 };
497
498 static void *obd_device_list_seq_start(struct seq_file *p, loff_t*pos)
499 {
500         if (*pos >= MAX_OBD_DEVICES)
501                 return NULL;
502         return &obd_dev[*pos];
503 }
504
505 static void obd_device_list_seq_stop(struct seq_file *p, void *v)
506 {
507 }
508
509 static void *obd_device_list_seq_next(struct seq_file *p, void *v, loff_t *pos)
510 {
511         ++*pos;
512         if (*pos >= MAX_OBD_DEVICES)
513                 return NULL;
514         return &obd_dev[*pos];
515 }
516
517 static int obd_device_list_seq_show(struct seq_file *p, void *v)
518 {
519         struct obd_device *obd = (struct obd_device *)v;
520         int index = obd - &obd_dev[0];
521         char *status;
522
523         if (!obd->obd_type)
524                 return 0;
525         if (obd->obd_stopping)
526                 status = "ST";
527         else if (obd->obd_set_up)
528                 status = "UP";
529         else if (obd->obd_attached)
530                 status = "AT";
531         else
532                 status = "--";
533
534         return seq_printf(p, "%3d %s %s %s %s %d\n",
535                           (int)index, status, obd->obd_type->typ_name,
536                           obd->obd_name, obd->obd_uuid.uuid,
537                           atomic_read(&obd->obd_refcount));
538 }
539
540 struct seq_operations obd_device_list_sops = {
541         .start = obd_device_list_seq_start,
542         .stop = obd_device_list_seq_stop,
543         .next = obd_device_list_seq_next,
544         .show = obd_device_list_seq_show,
545 };
546
547 static int obd_device_list_open(struct inode *inode, struct file *file)
548 {
549         struct proc_dir_entry *dp = PDE(inode);
550         struct seq_file *seq;
551         int rc = seq_open(file, &obd_device_list_sops);
552
553         if (rc)
554                 return rc;
555
556         seq = file->private_data;
557         seq->private = dp->data;
558
559         return 0;
560 }
561
562 struct file_operations obd_device_list_fops = {
563         .owner   = THIS_MODULE,
564         .open    = obd_device_list_open,
565         .read    = seq_read,
566         .llseek  = seq_lseek,
567         .release = seq_release,
568 };
569 #endif
570
571 extern int capa_cache_init(void);
572 extern void capa_cache_cleanup(void);
573
574 #ifdef __KERNEL__
575 static int __init init_obdclass(void)
576 #else
577 int init_obdclass(void)
578 #endif
579 {
580         struct obd_device *obd;
581 #ifdef LPROCFS
582         struct proc_dir_entry *entry;
583 #endif
584         int err;
585         int i;
586
587         printk(KERN_INFO "Lustre: OBD class driver Build Version: "
588                BUILD_VERSION", info@clusterfs.com\n");
589
590         class_init_uuidlist();
591         err = class_handle_init();
592         if (err)
593                 return err;
594
595         spin_lock_init(&obd_dev_lock);
596         INIT_LIST_HEAD(&obd_types);
597
598         err = misc_register(&obd_psdev);
599         if (err) {
600                 CERROR("cannot register %d err %d\n", OBD_MINOR, err);
601                 return err;
602         }
603
604         /* This struct is already zerod for us (static global) */
605         for (i = 0, obd = obd_dev; i < MAX_OBD_DEVICES; i++, obd++)
606                 obd->obd_minor = i;
607
608         err = obd_init_caches();
609         if (err)
610                 return err;
611
612         err = capa_cache_init();
613         if (err)
614                 return err;
615
616 #ifdef __KERNEL__
617         obd_sysctl_init();
618 #endif
619
620 #ifdef LPROCFS
621         proc_lustre_root = proc_mkdir("lustre", proc_root_fs);
622         if (!proc_lustre_root) {
623                 printk(KERN_ERR
624                        "LustreError: error registering /proc/fs/lustre\n");
625                 RETURN(-ENOMEM);
626         }
627         proc_version = lprocfs_add_vars(proc_lustre_root, lprocfs_base, NULL);
628         entry = create_proc_entry("devices", 0444, proc_lustre_root);
629         if (entry == NULL) {
630                 printk(KERN_ERR "LustreError: error registering "
631                        "/proc/fs/lustre/devices\n");
632                 lprocfs_remove(proc_lustre_root);
633                 RETURN(-ENOMEM);
634         }
635         entry->proc_fops = &obd_device_list_fops;
636 #endif
637         return 0;
638 }
639
640 /* liblustre doesn't call cleanup_obdclass, apparently.  we carry on in this
641  * ifdef to the end of the file to cover module and versioning goo.*/
642 #ifdef __KERNEL__
643
644 static void cleanup_obdclass(void)
645 {
646         int i;
647         ENTRY;
648
649         misc_deregister(&obd_psdev);
650         for (i = 0; i < MAX_OBD_DEVICES; i++) {
651                 struct obd_device *obd = &obd_dev[i];
652                 if (obd->obd_type && obd->obd_set_up &&
653                     OBT(obd) && OBP(obd, detach)) {
654                         /* XXX should this call generic detach otherwise? */
655                         OBP(obd, detach)(obd);
656                 }
657         }
658
659         capa_cache_cleanup();
660         obd_cleanup_caches();
661         obd_sysctl_clean();
662 #ifdef LPROCFS
663         if (proc_lustre_root) {
664                 lprocfs_remove(proc_lustre_root);
665                 proc_lustre_root = NULL;
666         }
667 #endif
668
669         class_handle_cleanup();
670         class_exit_uuidlist();
671         EXIT;
672 }
673
674 /* Check that we're building against the appropriate version of the Lustre
675  * kernel patch */
676 #include <linux/lustre_version.h>
677 #define LUSTRE_MIN_VERSION 500
678 #define LUSTRE_MAX_VERSION 500
679 #if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION)
680 # error Cannot continue: Your Lustre kernel patch is older than the sources
681 #elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION)
682 # error Cannot continue: Your Lustre sources are older than the kernel patch
683 #endif
684
685 MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
686 MODULE_DESCRIPTION("Lustre Class Driver Build Version: " BUILD_VERSION);
687 MODULE_LICENSE("GPL");
688
689 module_init(init_obdclass);
690 module_exit(cleanup_obdclass);
691 #endif