Commit 8150a97f authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

staging: lustre: Remove unnecessary externs



Using 'extern' is not necessary for function prototypes.

Miscellanea:

o Reflow alignments

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 049fbd9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+70 −71
Original line number Diff line number Diff line
@@ -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,
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);
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,
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);
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,
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);

extern int  ksocknal_launch_packet(lnet_ni_t *ni, ksock_tx_t *tx,
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,
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);
extern int ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn,
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,
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);

extern int ksocknal_tunables_init(void);
int ksocknal_tunables_init(void);

extern void ksocknal_lib_csum_tx(ksock_tx_t *tx);
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_lib_memory_pressure(ksock_conn_t *conn);
int ksocknal_lib_bind_thread_to_cpu(int id);

#endif /* _SOCKLND_SOCKLND_H_ */
+44 −46
Original line number Diff line number Diff line
@@ -187,49 +187,47 @@ 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 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);
extern int lstcon_session_info(lst_sid_t *sid_up, int *key, unsigned *verp,
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 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);
extern int lstcon_group_debug(int timeout, char *name,
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,
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,
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);
extern int lstcon_nodes_remove(char *name, int nnd, lnet_process_id_t *nds_up,
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 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,
			    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 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_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 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);
extern int lstcon_group_stat(char *grp_name, int timeout,
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 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 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,
+153 −160

File changed.

Preview size limit exceeded, changes collapsed.

+69 −64
Original line number Diff line number Diff line
@@ -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,
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);
extern void lustre_swab_lov_mds_md(struct lov_mds_md *lmm);
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
Loading