X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fsmfs%2Fsm_fs.c;h=e8709f854c0beeacbd968beac6a5abda28320ac3;hb=2dc9c16e770415d56839e1996015fec5fab93f29;hp=d07facb353f224fe225190ce85ba7ed807d435be;hpb=401deb5075f9ab7f6c8c1831c56a84b0134e923c;p=fs%2Flustre-release.git diff --git a/lustre/smfs/sm_fs.c b/lustre/smfs/sm_fs.c index d07facb..e8709f8 100644 --- a/lustre/smfs/sm_fs.c +++ b/lustre/smfs/sm_fs.c @@ -1,12 +1,33 @@ -/* - * fs/smfs/sm_fs.c +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: * - * A storage management file system. + * lustre/smfs/sm_fs.c + * Lustre filesystem abstraction routines * + * Copyright (C) 2004 Cluster File Systems, Inc. + * + * This file is part of Lustre, http://www.lustre.org. + * + * Lustre is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * Lustre is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Lustre; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define EXPORT_SYMTAB + #define DEBUG_SUBSYSTEM S_SM - + +#ifndef EXPORT_SYMTAB +#define EXPORT_SYMTAB +#endif + #include #include #include @@ -14,41 +35,51 @@ #include #include #include -#include -#include "smfs_internal.h" +#include +#include +#include +#include +#include +#include + +#include "smfs_internal.h" int sm_stack = 0; long sm_kmemory = 0; - MODULE_AUTHOR("Peter J. Braam "); MODULE_DESCRIPTION("Smfs file system filters v0.01"); - +MODULE_LICENSE("GPL"); + extern int init_smfs(void); extern int cleanup_smfs(void); -extern int init_snap_sysctl(void); - + static int __init smfs_init(void) { int err; - + + if ( (err = init_smfs_psdev()) ) { + printk("Error initializing smfs_psdev, %d\n", err); + return -EINVAL; + } + if ( (err = init_smfs()) ) { - printk("Error initializing snapfs, %d\n", err); + printk("Error initializing smfs, %d\n", err); return -EINVAL; } - + if ( (err = init_smfs_proc_sys()) ) { - printk("Error initializing snapfs proc sys, %d\n", err); + printk("Error initializing smfs proc sys, %d\n", err); return -EINVAL; } - + return 0; } - + static void __exit smfs_cleanup(void) { - cleanup_smfs(); + cleanup_smfs(); + smfs_cleanup_psdev(); } module_init(smfs_init); module_exit(smfs_cleanup); -