From: Joe Perches Date: Mon, 10 Aug 2015 21:51:21 +0000 (-0700) Subject: staging: lustre: Remove unnecessary externs X-Git-Tag: firefly_0821_release~176^2~1221^2~63 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8150a97fdd095d0468fe75d0d5ce4c9e0cbaf3a3;p=firefly-linux-kernel-4.4.55.git staging: lustre: Remove unnecessary externs Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index 2991be85d8b3..8d4580244c26 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -642,7 +642,7 @@ typedef struct kib_peer { extern kib_data_t kiblnd_data; -extern void kiblnd_hdev_destroy(kib_hca_dev_t *hdev); +void kiblnd_hdev_destroy(kib_hca_dev_t *hdev); static inline void kiblnd_hdev_addref_locked(kib_hca_dev_t *hdev) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h index cb91e68919d0..a0fcbc39f86b 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h @@ -520,8 +520,8 @@ ksocknal_conn_addref(ksock_conn_t *conn) atomic_inc(&conn->ksnc_conn_refcount); } -extern void ksocknal_queue_zombie_conn(ksock_conn_t *conn); -extern void ksocknal_finalize_zcreq(ksock_conn_t *conn); +void ksocknal_queue_zombie_conn(ksock_conn_t *conn); +void ksocknal_finalize_zcreq(ksock_conn_t *conn); static inline void ksocknal_conn_decref(ksock_conn_t *conn) @@ -566,8 +566,8 @@ ksocknal_tx_addref(ksock_tx_t *tx) atomic_inc(&tx->tx_refcount); } -extern void ksocknal_tx_prep(ksock_conn_t *, ksock_tx_t *tx); -extern void ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx); +void ksocknal_tx_prep(ksock_conn_t *, ksock_tx_t *tx); +void ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx); static inline void ksocknal_tx_decref(ksock_tx_t *tx) @@ -584,7 +584,7 @@ ksocknal_route_addref(ksock_route_t *route) atomic_inc(&route->ksnr_refcount); } -extern void ksocknal_destroy_route(ksock_route_t *route); +void ksocknal_destroy_route(ksock_route_t *route); static inline void ksocknal_route_decref(ksock_route_t *route) @@ -601,7 +601,7 @@ ksocknal_peer_addref(ksock_peer_t *peer) atomic_inc(&peer->ksnp_refcount); } -extern void ksocknal_destroy_peer(ksock_peer_t *peer); +void ksocknal_destroy_peer(ksock_peer_t *peer); static inline void ksocknal_peer_decref(ksock_peer_t *peer) @@ -621,70 +621,69 @@ int ksocknal_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, unsigned int offset, unsigned int mlen, unsigned int rlen); int ksocknal_accept(lnet_ni_t *ni, struct socket *sock); -extern int ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ip, int port); -extern ksock_peer_t *ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id); -extern ksock_peer_t *ksocknal_find_peer(lnet_ni_t *ni, lnet_process_id_t id); -extern void ksocknal_peer_failed(ksock_peer_t *peer); -extern int ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, - struct socket *sock, int type); -extern void ksocknal_close_conn_locked(ksock_conn_t *conn, int why); -extern void ksocknal_terminate_conn(ksock_conn_t *conn); -extern void ksocknal_destroy_conn(ksock_conn_t *conn); -extern int ksocknal_close_peer_conns_locked(ksock_peer_t *peer, - __u32 ipaddr, int why); -extern int ksocknal_close_conn_and_siblings(ksock_conn_t *conn, int why); -extern int ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr); -extern ksock_conn_t *ksocknal_find_conn_locked(ksock_peer_t *peer, - ksock_tx_t *tx, int nonblk); - -extern int ksocknal_launch_packet(lnet_ni_t *ni, ksock_tx_t *tx, - lnet_process_id_t id); -extern ksock_tx_t *ksocknal_alloc_tx(int type, int size); -extern void ksocknal_free_tx(ksock_tx_t *tx); -extern ksock_tx_t *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk); -extern void ksocknal_next_tx_carrier(ksock_conn_t *conn); -extern void ksocknal_queue_tx_locked(ksock_tx_t *tx, ksock_conn_t *conn); -extern void ksocknal_txlist_done(lnet_ni_t *ni, struct list_head *txlist, - int error); -extern void ksocknal_notify(lnet_ni_t *ni, lnet_nid_t gw_nid, int alive); -extern void ksocknal_query(struct lnet_ni *ni, lnet_nid_t nid, unsigned long *when); -extern int ksocknal_thread_start(int (*fn)(void *arg), void *arg, char *name); -extern void ksocknal_thread_fini(void); -extern void ksocknal_launch_all_connections_locked(ksock_peer_t *peer); -extern ksock_route_t *ksocknal_find_connectable_route_locked(ksock_peer_t *peer); -extern ksock_route_t *ksocknal_find_connecting_route_locked(ksock_peer_t *peer); -extern int ksocknal_new_packet(ksock_conn_t *conn, int skip); -extern int ksocknal_scheduler(void *arg); -extern int ksocknal_connd(void *arg); -extern int ksocknal_reaper(void *arg); -extern int ksocknal_send_hello(lnet_ni_t *ni, ksock_conn_t *conn, - lnet_nid_t peer_nid, ksock_hello_msg_t *hello); -extern int ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn, - ksock_hello_msg_t *hello, lnet_process_id_t *id, - __u64 *incarnation); -extern void ksocknal_read_callback(ksock_conn_t *conn); -extern void ksocknal_write_callback(ksock_conn_t *conn); - -extern int ksocknal_lib_zc_capable(ksock_conn_t *conn); -extern void ksocknal_lib_save_callback(struct socket *sock, ksock_conn_t *conn); -extern void ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn); -extern void ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn); -extern void ksocknal_lib_push_conn(ksock_conn_t *conn); -extern int ksocknal_lib_get_conn_addrs(ksock_conn_t *conn); -extern int ksocknal_lib_setup_sock(struct socket *so); -extern int ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx); -extern int ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx); -extern void ksocknal_lib_eager_ack(ksock_conn_t *conn); -extern int ksocknal_lib_recv_iov(ksock_conn_t *conn); -extern int ksocknal_lib_recv_kiov(ksock_conn_t *conn); -extern int ksocknal_lib_get_conn_tunables(ksock_conn_t *conn, int *txmem, - int *rxmem, int *nagle); - -extern int ksocknal_tunables_init(void); - -extern void ksocknal_lib_csum_tx(ksock_tx_t *tx); - -extern int ksocknal_lib_memory_pressure(ksock_conn_t *conn); -extern int ksocknal_lib_bind_thread_to_cpu(int id); +int ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ip, int port); +ksock_peer_t *ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id); +ksock_peer_t *ksocknal_find_peer(lnet_ni_t *ni, lnet_process_id_t id); +void ksocknal_peer_failed(ksock_peer_t *peer); +int ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, + struct socket *sock, int type); +void ksocknal_close_conn_locked(ksock_conn_t *conn, int why); +void ksocknal_terminate_conn(ksock_conn_t *conn); +void ksocknal_destroy_conn(ksock_conn_t *conn); +int ksocknal_close_peer_conns_locked(ksock_peer_t *peer, + __u32 ipaddr, int why); +int ksocknal_close_conn_and_siblings(ksock_conn_t *conn, int why); +int ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr); +ksock_conn_t *ksocknal_find_conn_locked(ksock_peer_t *peer, + ksock_tx_t *tx, int nonblk); + +int ksocknal_launch_packet(lnet_ni_t *ni, ksock_tx_t *tx, + lnet_process_id_t id); +ksock_tx_t *ksocknal_alloc_tx(int type, int size); +void ksocknal_free_tx(ksock_tx_t *tx); +ksock_tx_t *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk); +void ksocknal_next_tx_carrier(ksock_conn_t *conn); +void ksocknal_queue_tx_locked(ksock_tx_t *tx, ksock_conn_t *conn); +void ksocknal_txlist_done(lnet_ni_t *ni, struct list_head *txlist, int error); +void ksocknal_notify(lnet_ni_t *ni, lnet_nid_t gw_nid, int alive); +void ksocknal_query(struct lnet_ni *ni, lnet_nid_t nid, unsigned long *when); +int ksocknal_thread_start(int (*fn)(void *arg), void *arg, char *name); +void ksocknal_thread_fini(void); +void ksocknal_launch_all_connections_locked(ksock_peer_t *peer); +ksock_route_t *ksocknal_find_connectable_route_locked(ksock_peer_t *peer); +ksock_route_t *ksocknal_find_connecting_route_locked(ksock_peer_t *peer); +int ksocknal_new_packet(ksock_conn_t *conn, int skip); +int ksocknal_scheduler(void *arg); +int ksocknal_connd(void *arg); +int ksocknal_reaper(void *arg); +int ksocknal_send_hello(lnet_ni_t *ni, ksock_conn_t *conn, + lnet_nid_t peer_nid, ksock_hello_msg_t *hello); +int ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn, + ksock_hello_msg_t *hello, lnet_process_id_t *id, + __u64 *incarnation); +void ksocknal_read_callback(ksock_conn_t *conn); +void ksocknal_write_callback(ksock_conn_t *conn); + +int ksocknal_lib_zc_capable(ksock_conn_t *conn); +void ksocknal_lib_save_callback(struct socket *sock, ksock_conn_t *conn); +void ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn); +void ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn); +void ksocknal_lib_push_conn(ksock_conn_t *conn); +int ksocknal_lib_get_conn_addrs(ksock_conn_t *conn); +int ksocknal_lib_setup_sock(struct socket *so); +int ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx); +int ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx); +void ksocknal_lib_eager_ack(ksock_conn_t *conn); +int ksocknal_lib_recv_iov(ksock_conn_t *conn); +int ksocknal_lib_recv_kiov(ksock_conn_t *conn); +int ksocknal_lib_get_conn_tunables(ksock_conn_t *conn, int *txmem, + int *rxmem, int *nagle); + +int ksocknal_tunables_init(void); + +void ksocknal_lib_csum_tx(ksock_tx_t *tx); + +int ksocknal_lib_memory_pressure(ksock_conn_t *conn); +int ksocknal_lib_bind_thread_to_cpu(int id); #endif /* _SOCKLND_SOCKLND_H_ */ diff --git a/drivers/staging/lustre/lnet/selftest/console.h b/drivers/staging/lustre/lnet/selftest/console.h index c4cf0aed80e1..cdce2dd6be7c 100644 --- a/drivers/staging/lustre/lnet/selftest/console.h +++ b/drivers/staging/lustre/lnet/selftest/console.h @@ -187,51 +187,49 @@ lstcon_id2hash (lnet_process_id_t id, struct list_head *hash) int lstcon_console_init(void); int lstcon_ioctl_entry(unsigned int cmd, struct libcfs_ioctl_data *data); int lstcon_console_fini(void); -extern int lstcon_session_match(lst_sid_t sid); -extern int lstcon_session_new(char *name, int key, unsigned version, - int timeout, int flags, lst_sid_t *sid_up); -extern int lstcon_session_info(lst_sid_t *sid_up, int *key, unsigned *verp, - lstcon_ndlist_ent_t *entp, char *name_up, int len); -extern int lstcon_session_end(void); -extern int lstcon_session_debug(int timeout, struct list_head *result_up); -extern int lstcon_session_feats_check(unsigned feats); -extern int lstcon_batch_debug(int timeout, char *name, - int client, struct list_head *result_up); -extern int lstcon_group_debug(int timeout, char *name, - struct list_head *result_up); -extern int lstcon_nodes_debug(int timeout, int nnd, lnet_process_id_t *nds_up, - struct list_head *result_up); -extern int lstcon_group_add(char *name); -extern int lstcon_group_del(char *name); -extern int lstcon_group_clean(char *name, int args); -extern int lstcon_group_refresh(char *name, struct list_head *result_up); -extern int lstcon_nodes_add(char *name, int nnd, lnet_process_id_t *nds_up, - unsigned *featp, struct list_head *result_up); -extern int lstcon_nodes_remove(char *name, int nnd, lnet_process_id_t *nds_up, - struct list_head *result_up); -extern int lstcon_group_info(char *name, lstcon_ndlist_ent_t *gent_up, - int *index_p, int *ndent_p, lstcon_node_ent_t *ndents_up); -extern int lstcon_group_list(int idx, int len, char *name_up); -extern int lstcon_batch_add(char *name); -extern int lstcon_batch_run(char *name, int timeout, +int lstcon_session_match(lst_sid_t sid); +int lstcon_session_new(char *name, int key, unsigned version, + int timeout, int flags, lst_sid_t *sid_up); +int lstcon_session_info(lst_sid_t *sid_up, int *key, unsigned *verp, + lstcon_ndlist_ent_t *entp, char *name_up, int len); +int lstcon_session_end(void); +int lstcon_session_debug(int timeout, struct list_head *result_up); +int lstcon_session_feats_check(unsigned feats); +int lstcon_batch_debug(int timeout, char *name, + int client, struct list_head *result_up); +int lstcon_group_debug(int timeout, char *name, + struct list_head *result_up); +int lstcon_nodes_debug(int timeout, int nnd, lnet_process_id_t *nds_up, + struct list_head *result_up); +int lstcon_group_add(char *name); +int lstcon_group_del(char *name); +int lstcon_group_clean(char *name, int args); +int lstcon_group_refresh(char *name, struct list_head *result_up); +int lstcon_nodes_add(char *name, int nnd, lnet_process_id_t *nds_up, + unsigned *featp, struct list_head *result_up); +int lstcon_nodes_remove(char *name, int nnd, lnet_process_id_t *nds_up, + struct list_head *result_up); +int lstcon_group_info(char *name, lstcon_ndlist_ent_t *gent_up, + int *index_p, int *ndent_p, lstcon_node_ent_t *ndents_up); +int lstcon_group_list(int idx, int len, char *name_up); +int lstcon_batch_add(char *name); +int lstcon_batch_run(char *name, int timeout, struct list_head *result_up); +int lstcon_batch_stop(char *name, int force, struct list_head *result_up); +int lstcon_test_batch_query(char *name, int testidx, + int client, int timeout, struct list_head *result_up); -extern int lstcon_batch_stop(char *name, int force, - struct list_head *result_up); -extern int lstcon_test_batch_query(char *name, int testidx, - int client, int timeout, - struct list_head *result_up); -extern int lstcon_batch_del(char *name); -extern int lstcon_batch_list(int idx, int namelen, char *name_up); -extern int lstcon_batch_info(char *name, lstcon_test_batch_ent_t *ent_up, - int server, int testidx, int *index_p, - int *ndent_p, lstcon_node_ent_t *dents_up); -extern int lstcon_group_stat(char *grp_name, int timeout, - struct list_head *result_up); -extern int lstcon_nodes_stat(int count, lnet_process_id_t *ids_up, - int timeout, struct list_head *result_up); -extern int lstcon_test_add(char *batch_name, int type, int loop, - int concur, int dist, int span, - char *src_name, char *dst_name, - void *param, int paramlen, int *retp, - struct list_head *result_up); +int lstcon_batch_del(char *name); +int lstcon_batch_list(int idx, int namelen, char *name_up); +int lstcon_batch_info(char *name, lstcon_test_batch_ent_t *ent_up, + int server, int testidx, int *index_p, + int *ndent_p, lstcon_node_ent_t *dents_up); +int lstcon_group_stat(char *grp_name, int timeout, + struct list_head *result_up); +int lstcon_nodes_stat(int count, lnet_process_id_t *ids_up, + int timeout, struct list_head *result_up); +int lstcon_test_add(char *batch_name, int type, int loop, + int concur, int dist, int span, + char *src_name, char *dst_name, + void *param, int paramlen, int *retp, + struct list_head *result_up); #endif diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index 8ede2a00ca4f..fd3c4df319c2 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -375,12 +375,11 @@ static inline void s2dhms(struct dhms *ts, time_t secs) #define JOBSTATS_PROCNAME_UID "procname_uid" #define JOBSTATS_NODELOCAL "nodelocal" -extern int lprocfs_write_frac_helper(const char __user *buffer, - unsigned long count, int *val, int mult); -extern int lprocfs_read_frac_helper(char *buffer, unsigned long count, - long val, int mult); -extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, - unsigned int cpuid); +int lprocfs_write_frac_helper(const char __user *buffer, + unsigned long count, int *val, int mult); +int lprocfs_read_frac_helper(char *buffer, unsigned long count, + long val, int mult); +int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid); /* * \return value * < 0 : on error (only possible for opc as LPROCFS_GET_SMP_ID) @@ -497,20 +496,18 @@ lprocfs_stats_counter_get(struct lprocfs_stats *stats, unsigned int cpuid, * count itself to reside within a single cache line. */ -extern void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, - long amount); -extern void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx, - long amount); +void lprocfs_counter_add(struct lprocfs_stats *stats, int idx, long amount); +void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx, long amount); #define lprocfs_counter_incr(stats, idx) \ lprocfs_counter_add(stats, idx, 1) #define lprocfs_counter_decr(stats, idx) \ lprocfs_counter_sub(stats, idx, 1) -extern __s64 lprocfs_read_helper(struct lprocfs_counter *lc, - struct lprocfs_counter_header *header, - enum lprocfs_stats_flags flags, - enum lprocfs_fields_flags field); +__s64 lprocfs_read_helper(struct lprocfs_counter *lc, + struct lprocfs_counter_header *header, + enum lprocfs_stats_flags flags, + enum lprocfs_fields_flags field); static inline __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx, enum lprocfs_fields_flags field) @@ -537,107 +534,103 @@ static inline __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, extern struct lprocfs_stats * lprocfs_alloc_stats(unsigned int num, enum lprocfs_stats_flags flags); -extern void lprocfs_clear_stats(struct lprocfs_stats *stats); -extern void lprocfs_free_stats(struct lprocfs_stats **stats); -extern void lprocfs_init_ops_stats(int num_private_stats, - struct lprocfs_stats *stats); -extern void lprocfs_init_mps_stats(int num_private_stats, - struct lprocfs_stats *stats); -extern void lprocfs_init_ldlm_stats(struct lprocfs_stats *ldlm_stats); -extern int lprocfs_alloc_obd_stats(struct obd_device *obddev, - unsigned int num_private_stats); -extern int lprocfs_alloc_md_stats(struct obd_device *obddev, - unsigned int num_private_stats); -extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index, - unsigned conf, const char *name, - const char *units); -extern void lprocfs_free_obd_stats(struct obd_device *obddev); -extern void lprocfs_free_md_stats(struct obd_device *obddev); +void lprocfs_clear_stats(struct lprocfs_stats *stats); +void lprocfs_free_stats(struct lprocfs_stats **stats); +void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats); +void lprocfs_init_mps_stats(int num_private_stats, struct lprocfs_stats *stats); +void lprocfs_init_ldlm_stats(struct lprocfs_stats *ldlm_stats); +int lprocfs_alloc_obd_stats(struct obd_device *obddev, + unsigned int num_private_stats); +int lprocfs_alloc_md_stats(struct obd_device *obddev, + unsigned int num_private_stats); +void lprocfs_counter_init(struct lprocfs_stats *stats, int index, + unsigned conf, const char *name, const char *units); +void lprocfs_free_obd_stats(struct obd_device *obddev); +void lprocfs_free_md_stats(struct obd_device *obddev); struct obd_export; -extern int lprocfs_exp_cleanup(struct obd_export *exp); -extern struct dentry *ldebugfs_add_simple(struct dentry *root, - char *name, - void *data, - struct file_operations *fops); -extern struct dentry * +int lprocfs_exp_cleanup(struct obd_export *exp); +struct dentry *ldebugfs_add_simple(struct dentry *root, + char *name, + void *data, + struct file_operations *fops); +struct dentry * ldebugfs_add_symlink(const char *name, struct dentry *parent, - const char *format, ...); + const char *format, ...); -extern int ldebugfs_register_stats(struct dentry *parent, - const char *name, - struct lprocfs_stats *stats); +int ldebugfs_register_stats(struct dentry *parent, + const char *name, + struct lprocfs_stats *stats); /* lprocfs_status.c */ -extern int ldebugfs_add_vars(struct dentry *parent, - struct lprocfs_vars *var, - void *data); - -extern struct dentry *ldebugfs_register(const char *name, - struct dentry *parent, - struct lprocfs_vars *list, - void *data); - -extern void ldebugfs_remove(struct dentry **entryp); - -extern int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list, - struct attribute_group *attrs); -extern int lprocfs_obd_cleanup(struct obd_device *obd); - -extern int ldebugfs_seq_create(struct dentry *parent, - const char *name, - umode_t mode, - const struct file_operations *seq_fops, - void *data); -extern int ldebugfs_obd_seq_create(struct obd_device *dev, - const char *name, - umode_t mode, - const struct file_operations *seq_fops, - void *data); +int ldebugfs_add_vars(struct dentry *parent, + struct lprocfs_vars *var, + void *data); + +struct dentry *ldebugfs_register(const char *name, + struct dentry *parent, + struct lprocfs_vars *list, + void *data); + +void ldebugfs_remove(struct dentry **entryp); + +int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list, + struct attribute_group *attrs); +int lprocfs_obd_cleanup(struct obd_device *obd); + +int ldebugfs_seq_create(struct dentry *parent, + const char *name, + umode_t mode, + const struct file_operations *seq_fops, + void *data); +int ldebugfs_obd_seq_create(struct obd_device *dev, + const char *name, + umode_t mode, + const struct file_operations *seq_fops, + void *data); /* Generic callbacks */ -extern int lprocfs_rd_u64(struct seq_file *m, void *data); -extern int lprocfs_rd_atomic(struct seq_file *m, void *data); -extern int lprocfs_wr_atomic(struct file *file, const char __user *buffer, - unsigned long count, void *data); -extern int lprocfs_rd_uint(struct seq_file *m, void *data); -extern int lprocfs_wr_uint(struct file *file, const char __user *buffer, - unsigned long count, void *data); -extern int lprocfs_rd_name(struct seq_file *m, void *data); -extern int lprocfs_rd_server_uuid(struct seq_file *m, void *data); -extern int lprocfs_rd_conn_uuid(struct seq_file *m, void *data); -extern int lprocfs_rd_import(struct seq_file *m, void *data); -extern int lprocfs_rd_state(struct seq_file *m, void *data); -extern int lprocfs_rd_connect_flags(struct seq_file *m, void *data); +int lprocfs_rd_u64(struct seq_file *m, void *data); +int lprocfs_rd_atomic(struct seq_file *m, void *data); +int lprocfs_wr_atomic(struct file *file, const char __user *buffer, + unsigned long count, void *data); +int lprocfs_rd_uint(struct seq_file *m, void *data); +int lprocfs_wr_uint(struct file *file, const char __user *buffer, + unsigned long count, void *data); +int lprocfs_rd_name(struct seq_file *m, void *data); +int lprocfs_rd_server_uuid(struct seq_file *m, void *data); +int lprocfs_rd_conn_uuid(struct seq_file *m, void *data); +int lprocfs_rd_import(struct seq_file *m, void *data); +int lprocfs_rd_state(struct seq_file *m, void *data); +int lprocfs_rd_connect_flags(struct seq_file *m, void *data); struct adaptive_timeout; -extern int lprocfs_at_hist_helper(struct seq_file *m, - struct adaptive_timeout *at); -extern int lprocfs_rd_timeouts(struct seq_file *m, void *data); -extern int lprocfs_wr_timeouts(struct file *file, const char __user *buffer, - unsigned long count, void *data); -extern int lprocfs_wr_evict_client(struct file *file, const char __user *buffer, +int lprocfs_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at); +int lprocfs_rd_timeouts(struct seq_file *m, void *data); +int lprocfs_wr_timeouts(struct file *file, const char __user *buffer, + unsigned long count, void *data); +int lprocfs_wr_evict_client(struct file *file, const char __user *buffer, size_t count, loff_t *off); -extern int lprocfs_wr_ping(struct file *file, const char __user *buffer, - size_t count, loff_t *off); -extern int lprocfs_wr_import(struct file *file, const char __user *buffer, +int lprocfs_wr_ping(struct file *file, const char __user *buffer, + size_t count, loff_t *off); +int lprocfs_wr_import(struct file *file, const char __user *buffer, size_t count, loff_t *off); -extern int lprocfs_rd_pinger_recov(struct seq_file *m, void *n); -extern int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer, - size_t count, loff_t *off); +int lprocfs_rd_pinger_recov(struct seq_file *m, void *n); +int lprocfs_wr_pinger_recov(struct file *file, const char __user *buffer, + size_t count, loff_t *off); /* Statfs helpers */ -extern int lprocfs_write_helper(const char __user *buffer, unsigned long count, - int *val); -extern int lprocfs_seq_read_frac_helper(struct seq_file *m, long val, int mult); -extern int lprocfs_write_u64_helper(const char __user *buffer, - unsigned long count, __u64 *val); -extern int lprocfs_write_frac_u64_helper(const char *buffer, - unsigned long count, - __u64 *val, int mult); -extern char *lprocfs_find_named_value(const char *buffer, const char *name, - size_t *count); +int lprocfs_write_helper(const char __user *buffer, unsigned long count, + int *val); +int lprocfs_seq_read_frac_helper(struct seq_file *m, long val, int mult); +int lprocfs_write_u64_helper(const char __user *buffer, + unsigned long count, __u64 *val); +int lprocfs_write_frac_u64_helper(const char *buffer, + unsigned long count, + __u64 *val, int mult); +char *lprocfs_find_named_value(const char *buffer, const char *name, + size_t *count); void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value); void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value); void lprocfs_oh_clear(struct obd_histogram *oh); @@ -646,8 +639,8 @@ unsigned long lprocfs_oh_sum(struct obd_histogram *oh); void lprocfs_stats_collect(struct lprocfs_stats *stats, int idx, struct lprocfs_counter *cnt); -extern int lprocfs_single_release(struct inode *, struct file *); -extern int lprocfs_seq_release(struct inode *, struct file *); +int lprocfs_single_release(struct inode *, struct file *); +int lprocfs_seq_release(struct inode *, struct file *); /* You must use these macros when you want to refer to * the import in a client obd_device for a lprocfs entry */ @@ -746,7 +739,7 @@ extern const struct sysfs_ops lustre_sysfs_ops; /* lproc_ptlrpc.c */ struct ptlrpc_request; -extern void target_print_req(void *seq_file, struct ptlrpc_request *req); +void target_print_req(void *seq_file, struct ptlrpc_request *req); /* lproc_status.c */ int lprocfs_obd_rd_max_pages_per_rpc(struct seq_file *m, void *data); @@ -754,62 +747,62 @@ int lprocfs_obd_wr_max_pages_per_rpc(struct file *file, const char *buffer, size_t count, loff_t *off); /* all quota proc functions */ -extern int lprocfs_quota_rd_bunit(char *page, char **start, - loff_t off, int count, - int *eof, void *data); -extern int lprocfs_quota_wr_bunit(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_btune(char *page, char **start, - loff_t off, int count, - int *eof, void *data); -extern int lprocfs_quota_wr_btune(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_iunit(char *page, char **start, - loff_t off, int count, - int *eof, void *data); -extern int lprocfs_quota_wr_iunit(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_itune(char *page, char **start, - loff_t off, int count, - int *eof, void *data); -extern int lprocfs_quota_wr_itune(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_type(char *page, char **start, loff_t off, int count, - int *eof, void *data); -extern int lprocfs_quota_wr_type(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_switch_seconds(char *page, char **start, loff_t off, - int count, int *eof, void *data); -extern int lprocfs_quota_wr_switch_seconds(struct file *file, - const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_sync_blk(char *page, char **start, loff_t off, +int lprocfs_quota_rd_bunit(char *page, char **start, + loff_t off, int count, + int *eof, void *data); +int lprocfs_quota_wr_bunit(struct file *file, const char *buffer, + unsigned long count, void *data); +int lprocfs_quota_rd_btune(char *page, char **start, + loff_t off, int count, + int *eof, void *data); +int lprocfs_quota_wr_btune(struct file *file, const char *buffer, + unsigned long count, void *data); +int lprocfs_quota_rd_iunit(char *page, char **start, + loff_t off, int count, + int *eof, void *data); +int lprocfs_quota_wr_iunit(struct file *file, const char *buffer, + unsigned long count, void *data); +int lprocfs_quota_rd_itune(char *page, char **start, + loff_t off, int count, + int *eof, void *data); +int lprocfs_quota_wr_itune(struct file *file, const char *buffer, + unsigned long count, void *data); +int lprocfs_quota_rd_type(char *page, char **start, loff_t off, int count, + int *eof, void *data); +int lprocfs_quota_wr_type(struct file *file, const char *buffer, + unsigned long count, void *data); +int lprocfs_quota_rd_switch_seconds(char *page, char **start, loff_t off, + int count, int *eof, void *data); +int lprocfs_quota_wr_switch_seconds(struct file *file, + const char *buffer, + unsigned long count, void *data); +int lprocfs_quota_rd_sync_blk(char *page, char **start, loff_t off, + int count, int *eof, void *data); +int lprocfs_quota_wr_sync_blk(struct file *file, const char *buffer, + unsigned long count, void *data); +int lprocfs_quota_rd_switch_qs(char *page, char **start, loff_t off, + int count, int *eof, void *data); +int lprocfs_quota_wr_switch_qs(struct file *file, + const char *buffer, unsigned long count, + void *data); +int lprocfs_quota_rd_boundary_factor(char *page, char **start, loff_t off, int count, int *eof, void *data); -extern int lprocfs_quota_wr_sync_blk(struct file *file, const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_switch_qs(char *page, char **start, loff_t off, - int count, int *eof, void *data); -extern int lprocfs_quota_wr_switch_qs(struct file *file, - const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_boundary_factor(char *page, char **start, loff_t off, - int count, int *eof, void *data); -extern int lprocfs_quota_wr_boundary_factor(struct file *file, - const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_least_bunit(char *page, char **start, loff_t off, - int count, int *eof, void *data); -extern int lprocfs_quota_wr_least_bunit(struct file *file, - const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_least_iunit(char *page, char **start, loff_t off, - int count, int *eof, void *data); -extern int lprocfs_quota_wr_least_iunit(struct file *file, - const char *buffer, - unsigned long count, void *data); -extern int lprocfs_quota_rd_qs_factor(char *page, char **start, loff_t off, - int count, int *eof, void *data); -extern int lprocfs_quota_wr_qs_factor(struct file *file, - const char *buffer, - unsigned long count, void *data); +int lprocfs_quota_wr_boundary_factor(struct file *file, + const char *buffer, unsigned long count, + void *data); +int lprocfs_quota_rd_least_bunit(char *page, char **start, loff_t off, + int count, int *eof, void *data); +int lprocfs_quota_wr_least_bunit(struct file *file, + const char *buffer, unsigned long count, + void *data); +int lprocfs_quota_rd_least_iunit(char *page, char **start, loff_t off, + int count, int *eof, void *data); +int lprocfs_quota_wr_least_iunit(struct file *file, + const char *buffer, unsigned long count, + void *data); +int lprocfs_quota_rd_qs_factor(char *page, char **start, loff_t off, + int count, int *eof, void *data); +int lprocfs_quota_wr_qs_factor(struct file *file, + const char *buffer, unsigned long count, + void *data); #endif /* LPROCFS_SNMP_H */ diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index 4d72d6ed26b0..ac78dbc38b9f 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -747,7 +747,7 @@ static inline ino_t lu_igif_ino(const struct lu_fid *fid) return fid_seq(fid); } -extern void lustre_swab_ost_id(struct ost_id *oid); +void lustre_swab_ost_id(struct ost_id *oid); /** * Get inode generation from a igif. @@ -814,8 +814,8 @@ static inline int fid_is_zero(const struct lu_fid *fid) return fid_seq(fid) == 0 && fid_oid(fid) == 0; } -extern void lustre_swab_lu_fid(struct lu_fid *fid); -extern void lustre_swab_lu_seq_range(struct lu_seq_range *range); +void lustre_swab_lu_fid(struct lu_fid *fid); +void lustre_swab_lu_seq_range(struct lu_seq_range *range); static inline int lu_fid_eq(const struct lu_fid *f0, const struct lu_fid *f1) { @@ -1131,7 +1131,7 @@ struct ptlrpc_body_v2 { __u64 pb_padding[4]; }; -extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); +void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); /* message body offset for lustre_msg_v2 */ /* ptlrpc body offset in all request/reply messages */ @@ -1395,7 +1395,7 @@ struct obd_connect_data { * reserve the flag for future use. */ -extern void lustre_swab_connect(struct obd_connect_data *ocd); +void lustre_swab_connect(struct obd_connect_data *ocd); /* * Supported checksum algorithms. Up to 32 checksum types are supported. @@ -1737,10 +1737,10 @@ struct hsm_state_set { __u64 hss_clearmask; }; -extern void lustre_swab_hsm_user_state(struct hsm_user_state *hus); -extern void lustre_swab_hsm_state_set(struct hsm_state_set *hss); +void lustre_swab_hsm_user_state(struct hsm_user_state *hus); +void lustre_swab_hsm_state_set(struct hsm_state_set *hss); -extern void lustre_swab_obd_statfs (struct obd_statfs *os); +void lustre_swab_obd_statfs(struct obd_statfs *os); /* ost_body.data values for OST_BRW */ @@ -1780,7 +1780,7 @@ struct obd_ioobj { #define ioobj_max_brw_set(ioo, num) \ do { (ioo)->ioo_max_brw = ((num) - 1) << IOOBJ_MAX_BRW_BITS; } while (0) -extern void lustre_swab_obd_ioobj (struct obd_ioobj *ioo); +void lustre_swab_obd_ioobj(struct obd_ioobj *ioo); /* multiple of 8 bytes => can array */ struct niobuf_remote { @@ -1789,7 +1789,7 @@ struct niobuf_remote { __u32 flags; }; -extern void lustre_swab_niobuf_remote (struct niobuf_remote *nbr); +void lustre_swab_niobuf_remote(struct niobuf_remote *nbr); /* lock value block communicated between the filter and llite */ @@ -1811,7 +1811,7 @@ struct ost_lvb_v1 { __u64 lvb_blocks; }; -extern void lustre_swab_ost_lvb_v1(struct ost_lvb_v1 *lvb); +void lustre_swab_ost_lvb_v1(struct ost_lvb_v1 *lvb); struct ost_lvb { __u64 lvb_size; @@ -1825,7 +1825,7 @@ struct ost_lvb { __u32 lvb_padding; }; -extern void lustre_swab_ost_lvb(struct ost_lvb *lvb); +void lustre_swab_ost_lvb(struct ost_lvb *lvb); /* * lquota data structures @@ -1864,7 +1864,7 @@ struct obd_quotactl { struct obd_dqblk qc_dqblk; }; -extern void lustre_swab_obd_quotactl(struct obd_quotactl *q); +void lustre_swab_obd_quotactl(struct obd_quotactl *q); #define Q_QUOTACHECK 0x800100 /* deprecated as of 2.4 */ #define Q_INITQUOTA 0x800101 /* deprecated as of 2.4 */ @@ -1913,7 +1913,7 @@ struct quota_body { #define QUOTA_DQACQ_FL_REL 0x4 /* release quota */ #define QUOTA_DQACQ_FL_REPORT 0x8 /* report usage */ -extern void lustre_swab_quota_body(struct quota_body *b); +void lustre_swab_quota_body(struct quota_body *b); /* Quota types currently supported */ enum { @@ -1993,7 +1993,7 @@ struct lquota_lvb { __u64 lvb_pad1; }; -extern void lustre_swab_lquota_lvb(struct lquota_lvb *lvb); +void lustre_swab_lquota_lvb(struct lquota_lvb *lvb); /* LVB used with global quota lock */ #define lvb_glb_ver lvb_id_may_rel /* current version of the global index */ @@ -2072,7 +2072,7 @@ typedef enum { REINT_MAX } mds_reint_t, mdt_reint_t; -extern void lustre_swab_generic_32s (__u32 *val); +void lustre_swab_generic_32s(__u32 *val); /* the disposition of the intent outlines what was executed */ #define DISP_IT_EXECD 0x00000001 @@ -2112,7 +2112,7 @@ extern void lustre_swab_generic_32s (__u32 *val); /* This FULL lock is useful to take on unlink sort of operations */ #define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1) -extern void lustre_swab_ll_fid (struct ll_fid *fid); +void lustre_swab_ll_fid(struct ll_fid *fid); /* NOTE: until Lustre 1.8.7/2.1.1 the fid_ver() was packed into name[2], * but was moved into name[1] along with the OID to avoid consuming the @@ -2231,7 +2231,7 @@ struct mdt_body { __u64 padding_10; }; /* 216 */ -extern void lustre_swab_mdt_body (struct mdt_body *b); +void lustre_swab_mdt_body(struct mdt_body *b); struct mdt_ioepoch { struct lustre_handle handle; @@ -2240,7 +2240,7 @@ struct mdt_ioepoch { __u32 padding; }; -extern void lustre_swab_mdt_ioepoch (struct mdt_ioepoch *b); +void lustre_swab_mdt_ioepoch(struct mdt_ioepoch *b); /* permissions for md_perm.mp_perm */ enum { @@ -2264,7 +2264,7 @@ struct mdt_remote_perm { __u32 rp_padding; }; -extern void lustre_swab_mdt_remote_perm(struct mdt_remote_perm *p); +void lustre_swab_mdt_remote_perm(struct mdt_remote_perm *p); struct mdt_rec_setattr { __u32 sa_opcode; @@ -2294,7 +2294,7 @@ struct mdt_rec_setattr { __u32 sa_padding_5; }; -extern void lustre_swab_mdt_rec_setattr (struct mdt_rec_setattr *sa); +void lustre_swab_mdt_rec_setattr(struct mdt_rec_setattr *sa); /* * Attribute flags used in mdt_rec_setattr::sa_valid. @@ -2584,7 +2584,7 @@ struct mdt_rec_reint { __u32 rr_padding_4; /* also fix lustre_swab_mdt_rec_reint */ }; -extern void lustre_swab_mdt_rec_reint(struct mdt_rec_reint *rr); +void lustre_swab_mdt_rec_reint(struct mdt_rec_reint *rr); struct lmv_desc { __u32 ld_tgt_count; /* how many MDS's */ @@ -2600,7 +2600,7 @@ struct lmv_desc { struct obd_uuid ld_uuid; }; -extern void lustre_swab_lmv_desc (struct lmv_desc *ld); +void lustre_swab_lmv_desc(struct lmv_desc *ld); /* TODO: lmv_stripe_md should contain mds capabilities for all slave fids */ struct lmv_stripe_md { @@ -2612,7 +2612,7 @@ struct lmv_stripe_md { struct lu_fid mea_ids[0]; }; -extern void lustre_swab_lmv_stripe_md(struct lmv_stripe_md *mea); +void lustre_swab_lmv_stripe_md(struct lmv_stripe_md *mea); /* lmv structures */ #define MEA_MAGIC_LAST_CHAR 0xb2221ca1 @@ -2670,7 +2670,7 @@ struct lov_desc { #define ld_magic ld_active_tgt_count /* for swabbing from llogs */ -extern void lustre_swab_lov_desc (struct lov_desc *ld); +void lustre_swab_lov_desc(struct lov_desc *ld); /* * LDLM requests: @@ -2697,7 +2697,7 @@ struct ldlm_res_id { #define PLDLMRES(res) (res)->lr_name.name[0], (res)->lr_name.name[1], \ (res)->lr_name.name[2], (res)->lr_name.name[3] -extern void lustre_swab_ldlm_res_id (struct ldlm_res_id *id); +void lustre_swab_ldlm_res_id(struct ldlm_res_id *id); static inline int ldlm_res_eq(const struct ldlm_res_id *res0, const struct ldlm_res_id *res1) @@ -2774,19 +2774,19 @@ typedef union { struct ldlm_inodebits l_inodebits; } ldlm_wire_policy_data_t; -extern void lustre_swab_ldlm_policy_data (ldlm_wire_policy_data_t *d); +void lustre_swab_ldlm_policy_data(ldlm_wire_policy_data_t *d); union ldlm_gl_desc { struct ldlm_gl_lquota_desc lquota_desc; }; -extern void lustre_swab_gl_desc(union ldlm_gl_desc *); +void lustre_swab_gl_desc(union ldlm_gl_desc *); struct ldlm_intent { __u64 opc; }; -extern void lustre_swab_ldlm_intent (struct ldlm_intent *i); +void lustre_swab_ldlm_intent(struct ldlm_intent *i); struct ldlm_resource_desc { ldlm_type_t lr_type; @@ -2794,7 +2794,7 @@ struct ldlm_resource_desc { struct ldlm_res_id lr_name; }; -extern void lustre_swab_ldlm_resource_desc (struct ldlm_resource_desc *r); +void lustre_swab_ldlm_resource_desc(struct ldlm_resource_desc *r); struct ldlm_lock_desc { struct ldlm_resource_desc l_resource; @@ -2803,7 +2803,7 @@ struct ldlm_lock_desc { ldlm_wire_policy_data_t l_policy_data; }; -extern void lustre_swab_ldlm_lock_desc (struct ldlm_lock_desc *l); +void lustre_swab_ldlm_lock_desc(struct ldlm_lock_desc *l); #define LDLM_LOCKREQ_HANDLES 2 #define LDLM_ENQUEUE_CANCEL_OFF 1 @@ -2815,7 +2815,7 @@ struct ldlm_request { struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES]; }; -extern void lustre_swab_ldlm_request (struct ldlm_request *rq); +void lustre_swab_ldlm_request(struct ldlm_request *rq); /* If LDLM_ENQUEUE, 1 slot is already occupied, 1 is available. * Otherwise, 2 are available. */ @@ -2837,7 +2837,7 @@ struct ldlm_reply { __u64 lock_policy_res2; }; -extern void lustre_swab_ldlm_reply (struct ldlm_reply *r); +void lustre_swab_ldlm_reply(struct ldlm_reply *r); #define ldlm_flags_to_wire(flags) ((__u32)(flags)) #define ldlm_flags_from_wire(flags) ((__u64)(flags)) @@ -2881,7 +2881,8 @@ struct mgs_target_info { __u64 mti_nids[MTI_NIDS_MAX]; /* host nids (lnet_nid_t)*/ char mti_params[MTI_PARAM_MAXLEN]; }; -extern void lustre_swab_mgs_target_info(struct mgs_target_info *oinfo); + +void lustre_swab_mgs_target_info(struct mgs_target_info *oinfo); struct mgs_nidtbl_entry { __u64 mne_version; /* table version of this entry */ @@ -2896,7 +2897,8 @@ struct mgs_nidtbl_entry { lnet_nid_t nids[0]; /* variable size buffer for NIDs. */ } u; }; -extern void lustre_swab_mgs_nidtbl_entry(struct mgs_nidtbl_entry *oinfo); + +void lustre_swab_mgs_nidtbl_entry(struct mgs_nidtbl_entry *oinfo); struct mgs_config_body { char mcb_name[MTI_NAME_MAXLEN]; /* logname */ @@ -2906,13 +2908,15 @@ struct mgs_config_body { __u8 mcb_bits; /* bits unit size of config log */ __u32 mcb_units; /* # of units for bulk transfer */ }; -extern void lustre_swab_mgs_config_body(struct mgs_config_body *body); + +void lustre_swab_mgs_config_body(struct mgs_config_body *body); struct mgs_config_res { __u64 mcr_offset; /* index of last config log */ __u64 mcr_size; /* size of the log */ }; -extern void lustre_swab_mgs_config_res(struct mgs_config_res *body); + +void lustre_swab_mgs_config_res(struct mgs_config_res *body); /* Config marker flags (in config log) */ #define CM_START 0x01 @@ -2933,8 +2937,7 @@ struct cfg_marker { char cm_comment[MTI_NAME_MAXLEN]; }; -extern void lustre_swab_cfg_marker(struct cfg_marker *marker, - int swab, int size); +void lustre_swab_cfg_marker(struct cfg_marker *marker, int swab, int size); /* * Opcodes for multiple servers. @@ -3334,7 +3337,7 @@ static inline void lustre_get_wire_obdo(struct obd_connect_data *ocd, } } -extern void lustre_swab_obdo (struct obdo *o); +void lustre_swab_obdo(struct obdo *o); /* request structure for OST's */ struct ost_body { @@ -3348,25 +3351,25 @@ struct ll_fiemap_info_key { struct ll_user_fiemap fiemap; }; -extern void lustre_swab_ost_body (struct ost_body *b); -extern void lustre_swab_ost_last_id(__u64 *id); -extern void lustre_swab_fiemap(struct ll_user_fiemap *fiemap); +void lustre_swab_ost_body(struct ost_body *b); +void lustre_swab_ost_last_id(__u64 *id); +void lustre_swab_fiemap(struct ll_user_fiemap *fiemap); -extern void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum); -extern void lustre_swab_lov_user_md_v3(struct lov_user_md_v3 *lum); -extern void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod, - int stripe_count); -extern void lustre_swab_lov_mds_md(struct lov_mds_md *lmm); +void lustre_swab_lov_user_md_v1(struct lov_user_md_v1 *lum); +void lustre_swab_lov_user_md_v3(struct lov_user_md_v3 *lum); +void lustre_swab_lov_user_md_objects(struct lov_user_ost_data *lod, + int stripe_count); +void lustre_swab_lov_mds_md(struct lov_mds_md *lmm); /* llog_swab.c */ -extern void lustre_swab_llogd_body (struct llogd_body *d); -extern void lustre_swab_llog_hdr (struct llog_log_hdr *h); -extern void lustre_swab_llogd_conn_body (struct llogd_conn_body *d); -extern void lustre_swab_llog_rec(struct llog_rec_hdr *rec); -extern void lustre_swab_llog_id(struct llog_logid *lid); +void lustre_swab_llogd_body(struct llogd_body *d); +void lustre_swab_llog_hdr(struct llog_log_hdr *h); +void lustre_swab_llogd_conn_body(struct llogd_conn_body *d); +void lustre_swab_llog_rec(struct llog_rec_hdr *rec); +void lustre_swab_llog_id(struct llog_logid *lid); struct lustre_cfg; -extern void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg); +void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg); /* Functions for dumping PTLRPC fields */ void dump_rniobuf(struct niobuf_remote *rnb); @@ -3418,7 +3421,8 @@ struct idx_info { __u64 ii_pad2; __u64 ii_pad3; }; -extern void lustre_swab_idx_info(struct idx_info *ii); + +void lustre_swab_idx_info(struct idx_info *ii); #define II_END_OFF MDS_DIR_END_OFF /* all entries have been read */ @@ -3450,7 +3454,8 @@ struct lu_idxpage { * For the time being, we only support fixed-size key & record. */ char lip_entries[0]; }; -extern void lustre_swab_lip_header(struct lu_idxpage *lip); + +void lustre_swab_lip_header(struct lu_idxpage *lip); #define LIP_HDR_SIZE (offsetof(struct lu_idxpage, lip_entries)) @@ -3490,7 +3495,7 @@ struct lustre_capa { __u8 lc_hmac[CAPA_HMAC_MAX_LEN]; /** HMAC */ } __attribute__((packed)); -extern void lustre_swab_lustre_capa(struct lustre_capa *c); +void lustre_swab_lustre_capa(struct lustre_capa *c); /** lustre_capa::lc_opc */ enum { @@ -3548,7 +3553,7 @@ struct lustre_capa_key { __u8 lk_key[CAPA_HMAC_KEY_MAX_LEN]; /**< key */ } __attribute__((packed)); -extern void lustre_swab_lustre_capa_key(struct lustre_capa_key *k); +void lustre_swab_lustre_capa_key(struct lustre_capa_key *k); /** The link ea holds 1 \a link_ea_entry for each hardlink */ #define LINK_EA_MAGIC 0x11EAF1DFUL @@ -3620,12 +3625,12 @@ struct hsm_progress_kernel { __u64 hpk_padding2; } __attribute__((packed)); -extern void lustre_swab_hsm_user_state(struct hsm_user_state *hus); -extern void lustre_swab_hsm_current_action(struct hsm_current_action *action); -extern void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk); -extern void lustre_swab_hsm_user_state(struct hsm_user_state *hus); -extern void lustre_swab_hsm_user_item(struct hsm_user_item *hui); -extern void lustre_swab_hsm_request(struct hsm_request *hr); +void lustre_swab_hsm_user_state(struct hsm_user_state *hus); +void lustre_swab_hsm_current_action(struct hsm_current_action *action); +void lustre_swab_hsm_progress_kernel(struct hsm_progress_kernel *hpk); +void lustre_swab_hsm_user_state(struct hsm_user_state *hus); +void lustre_swab_hsm_user_item(struct hsm_user_item *hui); +void lustre_swab_hsm_request(struct hsm_request *hr); /** * These are object update opcode under UPDATE_OBJ, which is currently diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index e095ada40ed2..9b1bb23c4d3c 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -406,7 +406,7 @@ static inline int lmv_user_md_size(int stripes, int lmm_magic) stripes * sizeof(struct lmv_user_mds_data); } -extern void lustre_swab_lmv_user_md(struct lmv_user_md *lum); +void lustre_swab_lmv_user_md(struct lmv_user_md *lum); struct ll_recreate_obj { __u64 lrc_id; diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index f6f4c037fb30..355254689dee 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -1017,7 +1017,7 @@ extern struct obd_ops ldlm_obd_ops; extern char *ldlm_lockname[]; extern char *ldlm_typename[]; -extern char *ldlm_it2str(int it); +char *ldlm_it2str(int it); /** * Just a fancy CDEBUG call with log level preset to LDLM_DEBUG. diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h index 3b992b42fd91..5189fad0b73c 100644 --- a/drivers/staging/lustre/lustre/include/lustre_export.h +++ b/drivers/staging/lustre/lustre/include/lustre_export.h @@ -368,8 +368,8 @@ static inline bool imp_connect_disp_stripe(struct obd_import *imp) return ocd->ocd_connect_flags & OBD_CONNECT_DISP_STRIPE; } -extern struct obd_export *class_conn2export(struct lustre_handle *conn); -extern struct obd_device *class_conn2obd(struct lustre_handle *conn); +struct obd_export *class_conn2export(struct lustre_handle *conn); +struct obd_device *class_conn2obd(struct lustre_handle *conn); /** @} export */ diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index dcc807676c49..5a38f3d5e011 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -375,8 +375,8 @@ extern unsigned int at_max; /* genops.c */ struct obd_export; -extern struct obd_import *class_exp2cliimp(struct obd_export *); -extern struct obd_import *class_conn2cliimp(struct lustre_handle *); +struct obd_import *class_exp2cliimp(struct obd_export *); +struct obd_import *class_conn2cliimp(struct lustre_handle *); /** @} import */ diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index 3bb2f8b0c309..48ad60b22122 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -2277,18 +2277,18 @@ static inline bool nrs_policy_compat_one(const struct ptlrpc_service *svc, /* ptlrpc/events.c */ extern lnet_handle_eq_t ptlrpc_eq_h; -extern int ptlrpc_uuid_to_peer(struct obd_uuid *uuid, - lnet_process_id_t *peer, lnet_nid_t *self); +int ptlrpc_uuid_to_peer(struct obd_uuid *uuid, + lnet_process_id_t *peer, lnet_nid_t *self); /** * These callbacks are invoked by LNet when something happened to * underlying buffer * @{ */ -extern void request_out_callback(lnet_event_t *ev); -extern void reply_in_callback(lnet_event_t *ev); -extern void client_bulk_callback(lnet_event_t *ev); -extern void request_in_callback(lnet_event_t *ev); -extern void reply_out_callback(lnet_event_t *ev); +void request_out_callback(lnet_event_t *ev); +void reply_in_callback(lnet_event_t *ev); +void client_bulk_callback(lnet_event_t *ev); +void request_in_callback(lnet_event_t *ev); +void reply_out_callback(lnet_event_t *ev); /** @} */ /* ptlrpc/connection.c */ @@ -2299,7 +2299,7 @@ int ptlrpc_connection_put(struct ptlrpc_connection *c); struct ptlrpc_connection *ptlrpc_connection_addref(struct ptlrpc_connection *); int ptlrpc_connection_init(void); void ptlrpc_connection_fini(void); -extern lnet_pid_t ptl_get_pid(void); +lnet_pid_t ptl_get_pid(void); /* ptlrpc/niobuf.c */ /** diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index e1f8b15753f9..87bb2cedca7d 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -64,10 +64,10 @@ extern struct obd_device *obd_devs[MAX_OBD_DEVICES]; extern rwlock_t obd_dev_lock; /* OBD Operations Declarations */ -extern struct obd_device *class_conn2obd(struct lustre_handle *); -extern struct obd_device *class_exp2obd(struct obd_export *); -extern int class_handle_ioctl(unsigned int cmd, unsigned long arg); -extern int lustre_get_jobid(char *jobid); +struct obd_device *class_conn2obd(struct lustre_handle *); +struct obd_device *class_exp2obd(struct obd_export *); +int class_handle_ioctl(unsigned int cmd, unsigned long arg); +int lustre_get_jobid(char *jobid); struct lu_device_type; @@ -139,7 +139,7 @@ int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg); int class_add_uuid(const char *uuid, __u64 nid); /*obdecho*/ -extern void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars); +void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars); #define CFG_F_START 0x01 /* Set when we start updating from a log */ #define CFG_F_MARKER 0x02 /* We are within a maker */ @@ -1823,8 +1823,8 @@ static inline int md_revalidate_lock(struct obd_export *exp, /* OBD Metadata Support */ -extern int obd_init_caches(void); -extern void obd_cleanup_caches(void); +int obd_init_caches(void); +void obd_cleanup_caches(void); /* support routines */ extern struct kmem_cache *obdo_cachep; @@ -1869,7 +1869,7 @@ extern int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c); /* obd_mount.c */ /* sysctl.c */ -extern int obd_sysctl_init(void); +int obd_sysctl_init(void); /* uuid.c */ typedef __u8 class_uuid_t[16]; diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index 88e16717e854..18aec796a724 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -501,7 +501,7 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type, #define OBD_FAIL_ONCE CFS_FAIL_ONCE #define OBD_FAILED CFS_FAILED -extern void obd_update_maxusage(void); +void obd_update_maxusage(void); #define obd_memory_add(size) \ lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size)) @@ -520,8 +520,8 @@ extern void obd_update_maxusage(void); lprocfs_stats_collector(obd_memory, OBD_MEMORY_PAGES_STAT, \ LPROCFS_FIELDS_FLAGS_SUM) -extern __u64 obd_memory_max(void); -extern __u64 obd_pages_max(void); +__u64 obd_memory_max(void); +__u64 obd_pages_max(void); #define OBD_DEBUG_MEMUSAGE (1) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h index 6601e6b12c32..fa4b7c760d49 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h @@ -209,7 +209,7 @@ struct ldlm_state { /* interval tree, for LDLM_EXTENT. */ extern struct kmem_cache *ldlm_interval_slab; /* slab cache for ldlm_interval */ -extern void ldlm_interval_attach(struct ldlm_interval *n, struct ldlm_lock *l); +void ldlm_interval_attach(struct ldlm_interval *n, struct ldlm_lock *l); struct ldlm_interval *ldlm_interval_detach(struct ldlm_lock *l); struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock); void ldlm_interval_free(struct ldlm_interval *node); diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.h b/drivers/staging/lustre/lustre/libcfs/tracefile.h index 8d993f4d24c8..e931f6d98de9 100644 --- a/drivers/staging/lustre/lustre/libcfs/tracefile.h +++ b/drivers/staging/lustre/lustre/libcfs/tracefile.h @@ -47,7 +47,7 @@ extern char cfs_tracefile[TRACEFILE_NAME_SIZE]; extern long long cfs_tracefile_size; -extern void libcfs_run_debug_log_upcall(char *file); +void libcfs_run_debug_log_upcall(char *file); int cfs_tracefile_init_arch(void); void cfs_tracefile_fini_arch(void); @@ -79,11 +79,11 @@ int cfs_trace_daemon_command_usrstr(void __user *usr_str, int usr_str_nob); int cfs_trace_set_debug_mb(int mb); int cfs_trace_get_debug_mb(void); -extern void libcfs_debug_dumplog_internal(void *arg); -extern void libcfs_register_panic_notifier(void); -extern void libcfs_unregister_panic_notifier(void); +void libcfs_debug_dumplog_internal(void *arg); +void libcfs_register_panic_notifier(void); +void libcfs_unregister_panic_notifier(void); extern int libcfs_panic_in_progress; -extern int cfs_trace_max_debug_mb(void); +int cfs_trace_max_debug_mb(void); #define TCD_MAX_PAGES (5 << (20 - PAGE_CACHE_SHIFT)) #define TCD_STOCK_PAGES (TCD_MAX_PAGES) @@ -252,15 +252,15 @@ struct cfs_trace_page { unsigned short type; }; -extern void cfs_set_ptldebug_header(struct ptldebug_header *header, - struct libcfs_debug_msg_data *m, - unsigned long stack); -extern void cfs_print_to_console(struct ptldebug_header *hdr, int mask, - const char *buf, int len, const char *file, - const char *fn); +void cfs_set_ptldebug_header(struct ptldebug_header *header, + struct libcfs_debug_msg_data *m, + unsigned long stack); +void cfs_print_to_console(struct ptldebug_header *hdr, int mask, + const char *buf, int len, const char *file, + const char *fn); -extern int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking); -extern void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking); +int cfs_trace_lock_tcd(struct cfs_trace_cpu_data *tcd, int walking); +void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking); /** * trace_buf_type_t, trace_buf_idx_get() and trace_console_buffers[][] @@ -270,7 +270,7 @@ extern void cfs_trace_unlock_tcd(struct cfs_trace_cpu_data *tcd, int walking); */ extern char *cfs_trace_console_buffers[NR_CPUS][CFS_TCD_TYPE_MAX]; -extern cfs_trace_buf_type_t cfs_trace_buf_idx_get(void); +cfs_trace_buf_type_t cfs_trace_buf_idx_get(void); static inline char * cfs_trace_get_console_buffer(void) @@ -313,8 +313,8 @@ int cfs_trace_refill_stock(struct cfs_trace_cpu_data *tcd, gfp_t gfp, int cfs_tcd_owns_tage(struct cfs_trace_cpu_data *tcd, struct cfs_trace_page *tage); -extern void cfs_trace_assertion_failed(const char *str, - struct libcfs_debug_msg_data *m); +void cfs_trace_assertion_failed(const char *str, + struct libcfs_debug_msg_data *m); /* ASSERTION that is safe to use within the debug system */ #define __LASSERT(cond) \ diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index ec2797478350..ec8fff463208 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -710,11 +710,11 @@ extern struct file_operations ll_file_operations; extern struct file_operations ll_file_operations_flock; extern struct file_operations ll_file_operations_noflock; extern struct inode_operations ll_file_inode_operations; -extern int ll_have_md_lock(struct inode *inode, __u64 *bits, - ldlm_mode_t l_req_mode); -extern ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits, - struct lustre_handle *lockh, __u64 flags, - ldlm_mode_t mode); +int ll_have_md_lock(struct inode *inode, __u64 *bits, + ldlm_mode_t l_req_mode); +ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits, + struct lustre_handle *lockh, __u64 flags, + ldlm_mode_t mode); int ll_file_open(struct inode *inode, struct file *file); int ll_file_release(struct inode *inode, struct file *file); int ll_glimpse_ioctl(struct ll_sb_info *sbi, @@ -1375,9 +1375,9 @@ static inline void cl_stats_tally(struct cl_device *dev, enum cl_req_type crt, ll_stats_ops_tally(ll_s2sbi(cl2ccc_dev(dev)->cdv_sb), opc, rc); } -extern ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io, - int rw, struct inode *inode, - struct ll_dio_pages *pv); +ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io, + int rw, struct inode *inode, + struct ll_dio_pages *pv); static inline int ll_file_nolock(const struct file *file) {