From 1afb9904748a459d208f7eae0447e2ffe0f56d2a Mon Sep 17 00:00:00 2001 From: ericm Date: Mon, 27 Feb 2006 22:31:29 +0000 Subject: [PATCH] branch: b1_5 - move definition of all device names to include/obd.h instead of spreaded in include/obd_xx.h files. remove bunch of unnecessary inclusions of lustre_mds.h and ost_ost.h. --- lustre/include/lustre_mds.h | 4 ---- lustre/include/obd.h | 14 ++++++++++++++ lustre/include/obd_cache.h | 2 -- lustre/include/obd_echo.h | 3 --- lustre/include/obd_lov.h | 2 -- lustre/include/obd_ost.h | 6 ------ lustre/ldlm/ldlm_lib.c | 3 +-- lustre/llite/dcache.c | 1 - lustre/llite/dir.c | 1 - lustre/llite/llite_close.c | 1 - lustre/llite/llite_mmap.c | 1 - lustre/llite/rw.c | 1 - lustre/llite/rw24.c | 1 - lustre/llite/rw26.c | 1 - lustre/llite/xattr.c | 1 - lustre/lov/lov_ea.c | 1 - lustre/lov/lov_obd.c | 4 ++-- lustre/mdc/mdc_lib.c | 1 - lustre/mdc/mdc_locks.c | 1 - lustre/mdc/mdc_reint.c | 1 - lustre/mdc/mdc_request.c | 1 - lustre/mds/mds_internal.h | 2 +- lustre/obdclass/genops.c | 1 - lustre/obdclass/llog.c | 1 - lustre/obdclass/llog_cat.c | 1 - lustre/obdclass/llog_ioctl.c | 1 - lustre/obdclass/llog_lvfs.c | 1 - lustre/obdclass/llog_obd.c | 1 - lustre/obdclass/llog_swab.c | 1 - lustre/obdclass/llog_test.c | 1 - lustre/obdclass/obd_config.c | 1 - lustre/obdclass/uuid.c | 2 -- lustre/obdecho/echo.c | 6 +++--- lustre/obdecho/echo_client.c | 4 ++-- lustre/obdfilter/filter.c | 1 - lustre/obdfilter/filter_internal.h | 2 +- lustre/obdfilter/filter_log.c | 1 - lustre/osc/osc_request.c | 1 - lustre/ost/ost_handler.c | 1 - lustre/ptlrpc/llog_client.c | 1 - lustre/ptlrpc/llog_net.c | 1 - lustre/ptlrpc/llog_server.c | 1 - lustre/ptlrpc/recov_thread.c | 1 - 43 files changed, 24 insertions(+), 60 deletions(-) diff --git a/lustre/include/lustre_mds.h b/lustre/include/lustre_mds.h index e824f0e..f7af585 100644 --- a/lustre/include/lustre_mds.h +++ b/lustre/include/lustre_mds.h @@ -10,10 +10,6 @@ #ifndef _LUSTRE_MDS_H #define _LUSTRE_MDS_H -#define LUSTRE_MDS_NAME "mds" -#define LUSTRE_MDT_NAME "mdt" -#define LUSTRE_MDC_NAME "mdc" - #include #include #include diff --git a/lustre/include/obd.h b/lustre/include/obd.h index 04aaf8d..e66d174 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -477,6 +477,20 @@ struct niobuf_local { int rc; }; +/* obd device type names */ +#define LUSTRE_MDS_NAME "mds" +#define LUSTRE_MDT_NAME "mdt" +#define LUSTRE_MDC_NAME "mdc" +#define LUSTRE_FILTER_NAME "obdfilter" +#define LUSTRE_OST_NAME "ost" +#define LUSTRE_OSC_NAME "osc" +#define LUSTRE_SANOSC_NAME "sanosc" +#define LUSTRE_SANOST_NAME "sanost" +#define LUSTRE_LOV_NAME "lov" +#define LUSTRE_CACHEOBD_NAME "cobd" +#define LUSTRE_ECHO_NAME "obdecho" +#define LUSTRE_ECHO_CLIENT_NAME "echo_client" + /* Don't conflict with on-wire flags OBD_BRW_WRITE, etc */ #define N_LOCAL_TEMP_PAGE 0x10000000 diff --git a/lustre/include/obd_cache.h b/lustre/include/obd_cache.h index e75b9f4..c5ec326 100644 --- a/lustre/include/obd_cache.h +++ b/lustre/include/obd_cache.h @@ -7,7 +7,5 @@ #ifdef __KERNEL__ -#define OBD_CACHE_DEVICENAME "cobd" - #endif #endif diff --git a/lustre/include/obd_echo.h b/lustre/include/obd_echo.h index 0910041..53b0e6b 100644 --- a/lustre/include/obd_echo.h +++ b/lustre/include/obd_echo.h @@ -5,9 +5,6 @@ #ifndef _OBD_ECHO_H #define _OBD_ECHO_H -#define OBD_ECHO_DEVICENAME "obdecho" -#define OBD_ECHO_CLIENT_DEVICENAME "echo_client" - /* The persistent object (i.e. actually stores stuff!) */ #define ECHO_PERSISTENT_OBJID 1ULL #define ECHO_PERSISTENT_SIZE ((__u64)(1<<20)) diff --git a/lustre/include/obd_lov.h b/lustre/include/obd_lov.h index 188e91a..057fb9d 100644 --- a/lustre/include/obd_lov.h +++ b/lustre/include/obd_lov.h @@ -5,8 +5,6 @@ #ifndef _OBD_LOV_H__ #define _OBD_LOV_H__ -#define OBD_LOV_DEVICENAME "lov" - static inline int lov_stripe_md_size(int stripes) { return sizeof(struct lov_stripe_md) + stripes*sizeof(struct lov_oinfo); diff --git a/lustre/include/obd_ost.h b/lustre/include/obd_ost.h index afc8702..50aace7 100644 --- a/lustre/include/obd_ost.h +++ b/lustre/include/obd_ost.h @@ -13,12 +13,6 @@ #include -#define LUSTRE_FILTER_NAME "obdfilter" -#define LUSTRE_OST_NAME "ost" -#define LUSTRE_OSC_NAME "osc" -#define LUSTRE_SANOSC_NAME "sanosc" -#define LUSTRE_SANOST_NAME "sanost" - struct osc_brw_async_args { struct obdo *aa_oa; int aa_requested_nob; diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 9724ea5..f10e646 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -33,8 +33,7 @@ # include #endif #include -#include /* for LUSTRE_OSC_NAME */ -#include /* for LUSTRE_MDC_NAME */ +#include #include #include #include diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 5fc4197..b8500d4 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -27,7 +27,6 @@ #define DEBUG_SUBSYSTEM S_LLITE #include -#include #include #include #include diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index a0f8a13..f4cad51 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include "llite_internal.h" diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c index e033af1..29bce2e 100644 --- a/lustre/llite/llite_close.c +++ b/lustre/llite/llite_close.c @@ -25,7 +25,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include #include "llite_internal.h" diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index b5d47fa..8657ae3 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -44,7 +44,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 22cd48e..5f84234 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -43,7 +43,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/rw24.c b/lustre/llite/rw24.c index eb8f71a..f24baf1 100644 --- a/lustre/llite/rw24.c +++ b/lustre/llite/rw24.c @@ -44,7 +44,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index 6208012..222e779a 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -46,7 +46,6 @@ #define DEBUG_SUBSYSTEM S_LLITE -#include #include #include "llite_internal.h" #include diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index 9441a2e..39c1c33 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -36,7 +36,6 @@ #include #include #include -#include #include "llite_internal.h" diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c index ffc71de..89e8f14 100755 --- a/lustre/lov/lov_ea.c +++ b/lustre/lov/lov_ea.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include "lov_internal.h" diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index e1e06b7..452c9e7 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -2403,7 +2403,7 @@ int __init lov_init(void) init_obd_quota_ops(quota_interface, &lov_obd_ops); rc = class_register_type(&lov_obd_ops, lvars.module_vars, - OBD_LOV_DEVICENAME); + LUSTRE_LOV_NAME); if (rc && quota_interface) PORTAL_SYMBOL_PUT(osc_quota_interface); @@ -2416,7 +2416,7 @@ static void /*__exit*/ lov_exit(void) if (quota_interface) PORTAL_SYMBOL_PUT(lov_quota_interface); - class_unregister_type(OBD_LOV_DEVICENAME); + class_unregister_type(LUSTRE_LOV_NAME); } MODULE_AUTHOR("Cluster File Systems, Inc. "); diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index dddfca5..eb1f100 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -29,7 +29,6 @@ #endif #include #include -#include #include "mdc_internal.h" #ifndef __KERNEL__ diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index f4f23c4..734f37e 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -37,7 +37,6 @@ #endif #include -#include #include #include #include "mdc_internal.h" diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c index 3ecafc9..93bce95 100644 --- a/lustre/mdc/mdc_reint.c +++ b/lustre/mdc/mdc_reint.c @@ -36,7 +36,6 @@ #endif #include -#include #include "mdc_internal.h" /* mdc_setattr does its own semaphore handling */ diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 4b4eeba..f338d67 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -37,7 +37,6 @@ #endif #include -#include #include #include #include "mdc_internal.h" diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h index 4cf39d6..66cfa4a 100644 --- a/lustre/mds/mds_internal.h +++ b/lustre/mds/mds_internal.h @@ -5,7 +5,7 @@ #ifndef _MDS_INTERNAL_H #define _MDS_INTERNAL_H -#include /* XXX */ +#include #include #define MDT_ROCOMPAT_SUPP (OBD_ROCOMPAT_LOVOBJID) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index aeefaf9..0d8f434 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -29,7 +29,6 @@ #ifndef __KERNEL__ #include #endif -#include #include #include #include diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index a364bec..a6edbb7 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -40,7 +40,6 @@ #endif #include -#include #include #include diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 28e47c1..55039cc 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -40,7 +40,6 @@ #endif #include -#include #include #include diff --git a/lustre/obdclass/llog_ioctl.c b/lustre/obdclass/llog_ioctl.c index 0cafada..f9c1ec0 100644 --- a/lustre/obdclass/llog_ioctl.c +++ b/lustre/obdclass/llog_ioctl.c @@ -29,7 +29,6 @@ #endif #include -#include #include #include #include "llog_internal.h" diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index 7ea246d..594a00f 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -41,7 +41,6 @@ #include #include -#include #include #include #include diff --git a/lustre/obdclass/llog_obd.c b/lustre/obdclass/llog_obd.c index c8c2cf1..c987642 100644 --- a/lustre/obdclass/llog_obd.c +++ b/lustre/obdclass/llog_obd.c @@ -33,7 +33,6 @@ #endif #include -#include #include #include #include "llog_internal.h" diff --git a/lustre/obdclass/llog_swab.c b/lustre/obdclass/llog_swab.c index 303505b..e12003f 100644 --- a/lustre/obdclass/llog_swab.c +++ b/lustre/obdclass/llog_swab.c @@ -32,7 +32,6 @@ #include #endif -#include #include static void print_llogd_body(struct llogd_body *d) diff --git a/lustre/obdclass/llog_test.c b/lustre/obdclass/llog_test.c index 68f0d6a..25443ef 100644 --- a/lustre/obdclass/llog_test.c +++ b/lustre/obdclass/llog_test.c @@ -34,7 +34,6 @@ #include #include -#include /* for LUSTRE_MDC_NAME */ #include static int llog_test_rand; diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 67082af..ca38953 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -33,7 +33,6 @@ #include #include #endif -#include #include #include #include diff --git a/lustre/obdclass/uuid.c b/lustre/obdclass/uuid.c index e2d9af1..eb85aea 100644 --- a/lustre/obdclass/uuid.c +++ b/lustre/obdclass/uuid.c @@ -18,8 +18,6 @@ #include #include -#include /* for LUSTRE_OST_NAME */ -#include /* for LUSTRE_MDC_NAME */ struct uuid { __u32 time_low; diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index 9a07b6e..e55d130 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -590,7 +590,7 @@ static int __init obdecho_init(void) goto failed_0; rc = class_register_type(&echo_obd_ops, lvars.module_vars, - OBD_ECHO_DEVICENAME); + LUSTRE_ECHO_NAME); if (rc != 0) goto failed_1; @@ -598,7 +598,7 @@ static int __init obdecho_init(void) if (rc == 0) RETURN (0); - class_unregister_type(OBD_ECHO_DEVICENAME); + class_unregister_type(LUSTRE_ECHO_NAME); failed_1: echo_persistent_pages_fini (); failed_0: @@ -608,7 +608,7 @@ static int __init obdecho_init(void) static void /*__exit*/ obdecho_exit(void) { echo_client_exit(); - class_unregister_type(OBD_ECHO_DEVICENAME); + class_unregister_type(LUSTRE_ECHO_NAME); echo_persistent_pages_fini (); } diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c index a95eb77..2b06299 100644 --- a/lustre/obdecho/echo_client.c +++ b/lustre/obdecho/echo_client.c @@ -1456,10 +1456,10 @@ int echo_client_init(void) lprocfs_init_vars(echo, &lvars); return class_register_type(&echo_obd_ops, lvars.module_vars, - OBD_ECHO_CLIENT_DEVICENAME); + LUSTRE_ECHO_CLIENT_NAME); } void echo_client_exit(void) { - class_unregister_type(OBD_ECHO_CLIENT_DEVICENAME); + class_unregister_type(LUSTRE_ECHO_CLIENT_NAME); } diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 87c11eb..2f3c315 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -52,7 +52,6 @@ #include #include #include -#include #include #include #include diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h index 8de82d1..3b83746 100644 --- a/lustre/obdfilter/filter_internal.h +++ b/lustre/obdfilter/filter_internal.h @@ -8,9 +8,9 @@ #ifdef __KERNEL__ # include #endif +#include #include #include -#include #include #define FILTER_LAYOUT_VERSION "2" diff --git a/lustre/obdfilter/filter_log.c b/lustre/obdfilter/filter_log.c index 5421993..4a797c9 100644 --- a/lustre/obdfilter/filter_log.c +++ b/lustre/obdfilter/filter_log.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include "filter_internal.h" diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 23f535d..cc33a71 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -53,7 +53,6 @@ #include #include -#include #include #include #include "osc_internal.h" diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index c81868d..562eb09 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include diff --git a/lustre/ptlrpc/llog_client.c b/lustre/ptlrpc/llog_client.c index b250f0c..d714a84 100644 --- a/lustre/ptlrpc/llog_client.c +++ b/lustre/ptlrpc/llog_client.c @@ -39,7 +39,6 @@ #endif #include -#include #include #include #include diff --git a/lustre/ptlrpc/llog_net.c b/lustre/ptlrpc/llog_net.c index 0d21734..735ed31 100644 --- a/lustre/ptlrpc/llog_net.c +++ b/lustre/ptlrpc/llog_net.c @@ -42,7 +42,6 @@ #endif #include -#include #include #include #include diff --git a/lustre/ptlrpc/llog_server.c b/lustre/ptlrpc/llog_server.c index 1d81f2e..cf588d3 100644 --- a/lustre/ptlrpc/llog_server.c +++ b/lustre/ptlrpc/llog_server.c @@ -37,7 +37,6 @@ #endif #include -#include #include #include #include diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index 58f253c..2a1164c 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -44,7 +44,6 @@ #include #include -#include #include #include #include -- 1.8.3.1