Whamcloud - gitweb
smash the HEAD with the contents of b_cmd. HEAD_PRE_CMD_SMASH and
[fs/lustre-release.git] / lustre / smfs / sm_fs.c
1 /*
2  *  fs/smfs/sm_fs.c
3  *
4  *  A storage management file system.
5  *
6  */
7 #define EXPORT_SYMTAB
8 #define DEBUG_SUBSYSTEM S_SM
9                                                                                                                                                                                                      
10 #include <linux/module.h>
11 #include <linux/kernel.h>
12 #include <linux/string.h>
13 #include <linux/slab.h>
14 #include <linux/stat.h>
15 #include <linux/unistd.h>
16 #include <linux/miscdevice.h>
17 #include <linux/lustre_idl.h>                                                                                                                                                                                                     
18 #include "smfs_internal.h" 
19
20 int sm_stack = 0;
21 long sm_kmemory = 0;
22
23                                                                                                                                                                                                      
24 MODULE_AUTHOR("Peter J. Braam <braam@cs.cmu.edu>");
25 MODULE_DESCRIPTION("Smfs file system filters v0.01");
26                                                                                                                                                                                                      
27 extern int init_smfs(void);
28 extern int cleanup_smfs(void);
29 extern int init_snap_sysctl(void);
30                                                                                                                                                                                                      
31 static int __init smfs_init(void)
32 {
33         int err;
34                                                                                                                                                                                                      
35         if ( (err = init_smfs()) ) {
36                 printk("Error initializing snapfs, %d\n", err);
37                 return -EINVAL;
38         }
39                                                                                                                                                                                                      
40         if ( (err = init_smfs_proc_sys()) ) {
41                 printk("Error initializing snapfs proc sys, %d\n", err);
42                 return -EINVAL;
43         }
44                                                                                                                                                                                                      
45         return 0;
46 }
47                                                                                                                                                                                                      
48 static void __exit smfs_cleanup(void)
49 {
50         cleanup_smfs();
51 }
52 module_init(smfs_init);
53 module_exit(smfs_cleanup);
54