From d94bb93158f8deba28907a4ba7cfe8563003dd2d Mon Sep 17 00:00:00 2001 From: eeb Date: Fri, 4 Feb 2005 18:49:21 +0000 Subject: [PATCH] * Landed portals:b_port_step as follows... - removed CFS_DECL_SPIN* just use 'spinlock_t' and initialise with spin_lock_init() - removed CFS_DECL_MUTEX* just use 'struct semaphore' and initialise with init_mutex() - removed CFS_DECL_RWSEM* just use 'struct rw_semaphore' and initialise with init_rwsem() - renamed cfs_sleep_chan -> cfs_waitq cfs_sleep_link -> cfs_waitlink - fixed race in linux version of arch-independent socknal (the ENOMEM/EAGAIN decision). - Didn't fix problems in Darwin version of arch-independent socknal (resetting socket callbacks, eager ack hack, ENOMEM/EAGAIN decision) - removed libcfs types from non-socknal header files (only some types in the header files had been changed; the .c files hadn't been updated at all). - Updated lustre b1_4 to match --- lustre/include/liblustre.h | 27 +++------------------------ lustre/include/linux/lprocfs_status.h | 2 +- lustre/include/linux/lustre_compat25.h | 2 +- lustre/include/linux/lustre_idl.h | 2 ++ lustre/include/linux/lustre_lib.h | 8 +++----- lustre/include/linux/lustre_mds.h | 2 +- lustre/include/linux/lustre_net.h | 2 +- lustre/include/linux/lvfs.h | 2 +- lustre/include/linux/obd_class.h | 2 +- lustre/include/linux/obd_support.h | 2 +- lustre/ldlm/ldlm_flock.c | 2 +- lustre/ldlm/ldlm_lock.c | 2 +- lustre/ldlm/ldlm_lockd.c | 2 +- lustre/lvfs/fsfilt.c | 2 +- lustre/lvfs/fsfilt_ext3.c | 2 +- lustre/lvfs/fsfilt_reiserfs.c | 2 +- lustre/lvfs/lvfs_linux.c | 2 +- lustre/mds/mds_fs.c | 2 +- lustre/mds/mds_log.c | 2 +- lustre/mds/mds_unlink_open.c | 2 +- lustre/obdclass/class_obd.c | 2 +- lustre/obdclass/llog.c | 2 +- lustre/obdclass/llog_cat.c | 2 +- lustre/obdclass/llog_ioctl.c | 2 +- lustre/obdclass/llog_lvfs.c | 2 +- lustre/obdclass/llog_obd.c | 2 +- lustre/obdclass/obd_config.c | 2 +- lustre/obdfilter/filter.c | 2 +- lustre/obdfilter/filter_log.c | 2 +- lustre/obdfilter/filter_lvb.c | 2 +- lustre/osc/osc_request.c | 2 +- lustre/ost/ost_handler.c | 2 +- lustre/ptlrpc/llog_client.c | 2 +- lustre/ptlrpc/llog_net.c | 2 +- lustre/ptlrpc/llog_server.c | 2 +- lustre/ptlrpc/ptlrpcd.c | 2 +- lustre/ptlrpc/recov_thread.c | 6 +++--- lustre/ptlrpc/recover.c | 2 +- lustre/ptlrpc/service.c | 2 +- lustre/tests/mkdirdeep.c | 2 +- lustre/utils/obd.c | 4 ---- 41 files changed, 47 insertions(+), 72 deletions(-) diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index c9e1274..8022711 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -45,9 +45,9 @@ #include #include -#include +#include #include -#include +#include /* definitions for liblustre */ @@ -360,28 +360,7 @@ static inline int kmem_cache_destroy(kmem_cache_t *a) #define PAGE_CACHE_SHIFT PAGE_SHIFT #define PAGE_CACHE_MASK PAGE_MASK -/* XXX - * for this moment, liblusre will not rely OST for non-page-aligned write - */ -#define LIBLUSTRE_HANDLE_UNALIGNED_PAGE - -struct page { - void *addr; - unsigned long index; - struct list_head list; - unsigned long private; - - /* internally used by liblustre file i/o */ - int _offset; - int _count; -#ifdef LIBLUSTRE_HANDLE_UNALIGNED_PAGE - int _managed; -#endif -}; - -/* 2.4 defines */ -#define PAGE_LIST_ENTRY list -#define PAGE_LIST(page) ((page)->list) +/* struct page decl moved out from here into portals/include/libcfs/user-prim.h */ #define kmap(page) (page)->addr #define kunmap(a) do {} while (0) diff --git a/lustre/include/linux/lprocfs_status.h b/lustre/include/linux/lprocfs_status.h index f552d61..1055900 100644 --- a/lustre/include/linux/lprocfs_status.h +++ b/lustre/include/linux/lprocfs_status.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) # include diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index d6f039f..8e78e2e 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -29,7 +29,7 @@ #error sorry, lustre requires at least 2.5.69 #endif -#include +#include #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) diff --git a/lustre/include/linux/lustre_idl.h b/lustre/include/linux/lustre_idl.h index 42b510b..1101778 100644 --- a/lustre/include/linux/lustre_idl.h +++ b/lustre/include/linux/lustre_idl.h @@ -44,6 +44,8 @@ # include # include #endif +# include +# include #endif /* Defn's shared with user-space. */ diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h index 8af9863..6fdad0e 100644 --- a/lustre/include/linux/lustre_lib.h +++ b/lustre/include/linux/lustre_lib.h @@ -35,8 +35,8 @@ # include # include #endif -#include -#include /* XXX just for LASSERT! */ +#include +#include /* XXX just for LASSERT! */ #include #include @@ -126,8 +126,6 @@ void l_unlock(struct lustre_lock *); int l_has_lock(struct lustre_lock *); -#include - /* * OBD IOCTLS */ @@ -470,7 +468,7 @@ static inline void obd_ioctl_freedata(char *buf, int len) #define ECHO_IOC_CANCEL _IOWR('f', 203, long) /* XXX _IOWR('f', 250, long) has been defined in - * portals/include/linux/kp30.h for debug, don't use it + * portals/include/libcfs/kp30.h for debug, don't use it */ /* Until such time as we get_info the per-stripe maximum from the OST, diff --git a/lustre/include/linux/lustre_mds.h b/lustre/include/linux/lustre_mds.h index 82b9f23..0ebde73 100644 --- a/lustre/include/linux/lustre_mds.h +++ b/lustre/include/linux/lustre_mds.h @@ -15,7 +15,7 @@ # include #endif #include -#include +#include #include #include #include diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h index f5580e4..21ddb59 100644 --- a/lustre/include/linux/lustre_net.h +++ b/lustre/include/linux/lustre_net.h @@ -32,7 +32,7 @@ #endif #endif -#include +#include // #include #include #include diff --git a/lustre/include/linux/lvfs.h b/lustre/include/linux/lvfs.h index 5065397..e645441 100644 --- a/lustre/include/linux/lvfs.h +++ b/lustre/include/linux/lvfs.h @@ -24,7 +24,7 @@ #ifndef __LVFS_H__ #define __LVFS_H__ -#include +#include #define LL_FID_NAMELEN (16 + 1 + 8 + 1) diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h index b499e2d..4e7a8e5 100644 --- a/lustre/include/linux/obd_class.h +++ b/lustre/include/linux/obd_class.h @@ -25,7 +25,7 @@ #ifndef __KERNEL__ #include -#include +#include #else #include #include diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h index f40f876..fb35c49 100644 --- a/lustre/include/linux/obd_support.h +++ b/lustre/include/linux/obd_support.h @@ -29,7 +29,7 @@ #include #include #endif -#include +#include #include /* global variables */ diff --git a/lustre/ldlm/ldlm_flock.c b/lustre/ldlm/ldlm_flock.c index c1cd3bf..7035f04 100644 --- a/lustre/ldlm/ldlm_flock.c +++ b/lustre/ldlm/ldlm_flock.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #else #include #endif diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index 75efd2b..2168f1f2 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -29,7 +29,7 @@ # include #else # include -# include +# include #endif #include diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 0e55042..0647f98 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include "ldlm_internal.h" extern kmem_cache_t *ldlm_resource_slab; diff --git a/lustre/lvfs/fsfilt.c b/lustre/lvfs/fsfilt.c index a9ddf8b..cc14ab6 100644 --- a/lustre/lvfs/fsfilt.c +++ b/lustre/lvfs/fsfilt.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include LIST_HEAD(fsfilt_types); diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 19fa6e4..8c5bc89 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -42,7 +42,7 @@ #include #endif -#include +#include #include #include #include diff --git a/lustre/lvfs/fsfilt_reiserfs.c b/lustre/lvfs/fsfilt_reiserfs.c index 861b663..b9f987ab 100644 --- a/lustre/lvfs/fsfilt_reiserfs.c +++ b/lustre/lvfs/fsfilt_reiserfs.c @@ -41,7 +41,7 @@ #include #include #endif -#include +#include #include #include #include diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c index 6742dd6..b463b88 100644 --- a/lustre/lvfs/lvfs_linux.c +++ b/lustre/lvfs/lvfs_linux.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c index 4728176..f6212a3 100644 --- a/lustre/mds/mds_fs.c +++ b/lustre/mds/mds_fs.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "mds_internal.h" diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c index b8ce8b5..b7ebc31 100644 --- a/lustre/mds/mds_log.c +++ b/lustre/mds/mds_log.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c index 92b4a45..f6bc83c 100644 --- a/lustre/mds/mds_unlink_open.c +++ b/lustre/mds/mds_unlink_open.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index 4106977..7491b28 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -67,7 +67,7 @@ #include #include #endif -#include +#include #include "llog_internal.h" #ifndef __KERNEL__ diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 0d31a03..6d76716 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -40,7 +40,7 @@ #include #include -#include +#include /* Allocate a new log or catalog handle */ struct llog_handle *llog_alloc_handle(void) diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index c4df3f8..1ebbc30 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -40,7 +40,7 @@ #include #include -#include +#include /* Create a new log handle and add it to the open list. * This log handle will be closed when all of the records in it are removed. diff --git a/lustre/obdclass/llog_ioctl.c b/lustre/obdclass/llog_ioctl.c index 40ed1e4..f364a21 100644 --- a/lustre/obdclass/llog_ioctl.c +++ b/lustre/obdclass/llog_ioctl.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "llog_internal.h" static int str2logid(struct llog_logid *logid, char *str, int len) diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index f032552..40d0753 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include #include "llog_internal.h" diff --git a/lustre/obdclass/llog_obd.c b/lustre/obdclass/llog_obd.c index e9a9856..cdbcce8 100644 --- a/lustre/obdclass/llog_obd.c +++ b/lustre/obdclass/llog_obd.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include "llog_internal.h" /* helper functions for calling the llog obd methods */ diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 4035346..4bb616d 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -37,7 +37,7 @@ #endif #include #include -#include +#include /* Create a new device and set the type, name and uuid. If diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index d1ba241..fa487a8 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include "filter_internal.h" diff --git a/lustre/obdfilter/filter_log.c b/lustre/obdfilter/filter_log.c index d2dd8b04b..97675bb 100644 --- a/lustre/obdfilter/filter_log.c +++ b/lustre/obdfilter/filter_log.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/lustre/obdfilter/filter_lvb.c b/lustre/obdfilter/filter_lvb.c index 41d42f2..c8a9d9b 100644 --- a/lustre/obdfilter/filter_lvb.c +++ b/lustre/obdfilter/filter_lvb.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 1741f0d..f2493b4 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -49,7 +49,7 @@ #endif # include -#include +#include #include #include #include diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 924c03c..ae67814 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include "ost_internal.h" void oti_init(struct obd_trans_info *oti, struct ptlrpc_request *req) diff --git a/lustre/ptlrpc/llog_client.c b/lustre/ptlrpc/llog_client.c index 81089ac..5b8e33f 100644 --- a/lustre/ptlrpc/llog_client.c +++ b/lustre/ptlrpc/llog_client.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include /* This is a callback from the llog_* functions. * Assumes caller has already pushed us into the kernel context. */ diff --git a/lustre/ptlrpc/llog_net.c b/lustre/ptlrpc/llog_net.c index 0eb8d41..fa2fc8e 100644 --- a/lustre/ptlrpc/llog_net.c +++ b/lustre/ptlrpc/llog_net.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #ifdef __KERNEL__ diff --git a/lustre/ptlrpc/llog_server.c b/lustre/ptlrpc/llog_server.c index 321d8e2..a038d8a 100644 --- a/lustre/ptlrpc/llog_server.c +++ b/lustre/ptlrpc/llog_server.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #ifdef __KERNEL__ diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index d40dfb4..fc048fb 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -42,7 +42,7 @@ # include #endif -#include +#include #include #include diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index 6239e5a..11d37b4 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -35,18 +35,18 @@ #ifdef __KERNEL__ #include #else -# include +# include # include #endif -#include +#include #include #include #include #include #include #include -#include +#include #include #include "ptlrpc_internal.h" diff --git a/lustre/ptlrpc/recover.c b/lustre/ptlrpc/recover.c index 6dc0e55..68d7b02 100644 --- a/lustre/ptlrpc/recover.c +++ b/lustre/ptlrpc/recover.c @@ -40,7 +40,7 @@ #include #include #include /* for IOC_LOV_SET_OSC_ACTIVE */ -#include +#include #include "ptlrpc_internal.h" diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 4104d7f..5cd30eb 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -23,7 +23,7 @@ #define DEBUG_SUBSYSTEM S_RPC #ifndef __KERNEL__ #include -#include +#include #endif #include #include diff --git a/lustre/tests/mkdirdeep.c b/lustre/tests/mkdirdeep.c index 1326c1e..8641d1d 100644 --- a/lustre/tests/mkdirdeep.c +++ b/lustre/tests/mkdirdeep.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include static int opt_verbose = 0; static int opt_trace = 0; diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index b5e75d1..c14e4a5 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -50,10 +50,6 @@ #include /* needed for PAGE_SIZE - rread */ -#define __KERNEL__ -#include -#undef __KERNEL__ - #include #include #include "parser.h" -- 1.8.3.1