X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fsmfs%2Fsysctl.c;h=7a36c65950d974020c7f1f9f7f9adbbc796439e5;hb=1a39214bb49e82c2a3410392c0fce5258dbac64d;hp=785b3dd9300fe8bbc921328cd602984f09ee68f7;hpb=b2ac7b39a0b999b7e3d38b4164f9f2147a76a2e5;p=fs%2Flustre-release.git diff --git a/lustre/smfs/sysctl.c b/lustre/smfs/sysctl.c index 785b3dd..7a36c65 100644 --- a/lustre/smfs/sysctl.c +++ b/lustre/smfs/sysctl.c @@ -1,10 +1,28 @@ -/* - * Sysctrl entries for Snapfs +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + * + * lustre/smfs/inode.c + * Lustre filesystem abstraction routines + * + * Copyright (C) 2002, 2003 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. */ -/* /proc entries */ - -#define DEBUG_SUBSYSTEM S_SNAP +#define DEBUG_SUBSYSTEM S_SM #include #include @@ -14,15 +32,20 @@ #include #include #include +#include +#include +#include #include -#include "smfs_internal.h" +#include +#include + +#include "smfs_internal.h" #ifdef CONFIG_PROC_FS static struct proc_dir_entry *proc_smfs_root; #endif - /* SYSCTL below */ static struct ctl_table_header *smfs_table_header = NULL; @@ -31,8 +54,8 @@ static struct ctl_table_header *smfs_table_header = NULL; */ #define PSDEV_SMFS (0x130) -#define PSDEV_DEBUG 1 /* control debugging */ -#define PSDEV_TRACE 2 /* control enter/leave pattern */ +#define PSDEV_DEBUG 1 /* control debugging */ +#define PSDEV_TRACE 2 /* control enter/leave pattern */ /* These are global control options */ #define ENTRY_CNT 3 @@ -43,45 +66,46 @@ int sm_debug_level = 0; /* XXX - doesn't seem to be working in 2.2.15 */ static struct ctl_table smfs_ctltable[] = { - {PSDEV_DEBUG, "debug", &sm_debug_level, sizeof(int), 0644, NULL, &proc_dointvec}, - {PSDEV_TRACE, "trace", &sm_print_entry, sizeof(int), 0644, NULL, &proc_dointvec}, - {0} + {PSDEV_DEBUG, "debug", &sm_debug_level, sizeof(int), 0644, NULL, + &proc_dointvec}, + {PSDEV_TRACE, "trace", &sm_print_entry, sizeof(int), 0644, NULL, + &proc_dointvec}, + {0} }; static ctl_table smfs_table[2] = { - {PSDEV_SMFS, "smfs", NULL, 0, 0555, smfs_ctltable}, - {0} + {PSDEV_SMFS, "smfs", NULL, 0, 0555, smfs_ctltable}, + {0} }; int __init init_smfs_proc_sys(void) { #ifdef CONFIG_PROC_FS - proc_smfs_root = proc_mkdir("smfs", proc_root_fs); - if (!proc_smfs_root) { - printk(KERN_ERR "SMFS: error registering /proc/fs/smfs\n"); - RETURN(-ENOMEM); - } - proc_smfs_root->owner = THIS_MODULE; + proc_smfs_root = proc_mkdir("smfs", proc_root_fs); + if (!proc_smfs_root) { + printk(KERN_ERR "SMFS: error registering /proc/fs/smfs\n"); + RETURN(-ENOMEM); + } + proc_smfs_root->owner = THIS_MODULE; #endif #ifdef CONFIG_SYSCTL - if ( !smfs_table_header ) - smfs_table_header = - register_sysctl_table(smfs_table, 0); + if ( !smfs_table_header ) + smfs_table_header = + register_sysctl_table(smfs_table, 0); #endif - return 0; + return 0; } -void cleanup_smfs_proc_sys(void) +void cleanup_smfs_proc_sys(void) { #ifdef CONFIG_SYSCTL - if ( smfs_table_header ) - unregister_sysctl_table(smfs_table_header); - smfs_table_header = NULL; + if ( smfs_table_header ) + unregister_sysctl_table(smfs_table_header); + smfs_table_header = NULL; #endif #if CONFIG_PROC_FS - remove_proc_entry("smfs", proc_root_fs); + remove_proc_entry("smfs", proc_root_fs); #endif } -