X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fselftest%2Fselftest.h;h=9fecaaddfbe0ed1f76da9d90e4ac7ef98d2496f5;hb=8db1193f8e59ffe56e0a824faf4319de705ed672;hp=830418c191f75c6fa85250b2fdcd05fff70cd2dd;hpb=f6995cf04407dff15d6ca79ca44cfa97dc6eb014;p=fs%2Flustre-release.git diff --git a/lnet/selftest/selftest.h b/lnet/selftest/selftest.h index 830418c..9fecaad 100644 --- a/lnet/selftest/selftest.h +++ b/lnet/selftest/selftest.h @@ -15,12 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * copy of GPLv2]. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ @@ -28,7 +23,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, 2013, Intel Corporation. + * Copyright (c) 2012, 2016, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -176,7 +171,7 @@ typedef int (*swi_action_t) (struct swi_workitem *); typedef struct swi_workitem { struct cfs_wi_sched *swi_sched; - cfs_workitem_t swi_workitem; + struct cfs_workitem swi_workitem; swi_action_t swi_action; int swi_state; } swi_workitem_t; @@ -279,7 +274,7 @@ struct srpc_service_cd { /** error code for scd_buf_wi */ int scd_buf_err; /** timestamp for scd_buf_err */ - unsigned long scd_buf_err_stamp; + time64_t scd_buf_err_stamp; /** total # request buffers */ int scd_buf_total; /** # posted request buffers */ @@ -326,7 +321,7 @@ typedef struct srpc_service { typedef struct { /* chain on fw_zombie_sessions */ struct list_head sn_list; - lst_sid_t sn_id; /* unique identifier */ + struct lst_sid sn_id; /* unique identifier */ /* # seconds' inactivity to expire */ unsigned int sn_timeout; int sn_timer_active; @@ -345,7 +340,7 @@ typedef struct { typedef struct { struct list_head bat_list; /* chain on sn_batches */ - lst_bid_t bat_id; /* batch id */ + struct lst_bid bat_id; /* batch id */ int bat_error; /* error code of batch */ sfw_session_t *bat_session; /* batch's session */ atomic_t bat_nactive; /* # of active tests */ @@ -389,10 +384,10 @@ typedef struct sfw_test_instance { } tsi_u; } sfw_test_instance_t; -/* XXX: trailing (PAGE_CACHE_SIZE % sizeof(lnet_process_id_t)) bytes at +/* XXX: trailing (PAGE_SIZE % sizeof(lnet_process_id_t)) bytes at * the end of pages are not used */ #define SFW_MAX_CONCUR LST_MAX_CONCUR -#define SFW_ID_PER_PAGE (PAGE_CACHE_SIZE / sizeof(lnet_process_id_packed_t)) +#define SFW_ID_PER_PAGE (PAGE_SIZE / sizeof(struct lnet_process_id_packed)) #define SFW_MAX_NDESTS (LNET_MAX_IOV * SFW_ID_PER_PAGE) #define sfw_id_pages(n) (((n) + SFW_ID_PER_PAGE - 1) / SFW_ID_PER_PAGE) @@ -436,8 +431,8 @@ srpc_create_client_rpc(lnet_process_id_t peer, int service, void srpc_post_rpc(srpc_client_rpc_t *rpc); void srpc_abort_rpc(srpc_client_rpc_t *rpc, int why); void srpc_free_bulk(srpc_bulk_t *bk); -srpc_bulk_t *srpc_alloc_bulk(int cpt, unsigned bulk_npg, unsigned bulk_len, - int sink); +srpc_bulk_t *srpc_alloc_bulk(int cpt, unsigned off, unsigned bulk_npg, + unsigned bulk_len, int sink); int srpc_send_rpc(swi_workitem_t *wi); int srpc_send_reply(srpc_server_rpc_t *rpc); int srpc_add_service(srpc_service_t *sv); @@ -447,8 +442,8 @@ void srpc_abort_service(srpc_service_t *sv); int srpc_finish_service(srpc_service_t *sv); int srpc_service_add_buffers(srpc_service_t *sv, int nbuffer); void srpc_service_remove_buffers(srpc_service_t *sv, int nbuffer); -void srpc_get_counters(srpc_counters_t *cnt); -void srpc_set_counters(const srpc_counters_t *cnt); +void srpc_get_counters(struct srpc_counters *cnt); +void srpc_set_counters(const struct srpc_counters *cnt); extern struct cfs_wi_sched *lst_sched_serial; extern struct cfs_wi_sched **lst_sched_test; @@ -460,7 +455,7 @@ srpc_serv_is_framework(struct srpc_service *svc) } static inline int -swi_wi_action(cfs_workitem_t *wi) +swi_wi_action(struct cfs_workitem *wi) { swi_workitem_t *swi = container_of(wi, swi_workitem_t, swi_workitem); @@ -529,7 +524,7 @@ srpc_init_client_rpc(srpc_client_rpc_t *rpc, lnet_process_id_t peer, INIT_LIST_HEAD(&rpc->crpc_list); swi_init_workitem(&rpc->crpc_wi, rpc, srpc_send_rpc, - lst_sched_test[lnet_cpt_of_nid(peer.nid)]); + lst_sched_test[lnet_cpt_of_nid(peer.nid, NULL)]); spin_lock_init(&rpc->crpc_lock); atomic_set(&rpc->crpc_refcount, 1); /* 1 ref for caller */