X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Finclude%2Flnet%2Flib-lnet.h;h=ecc97da3e7be07ee0013e12923ddad70c637f3cd;hp=6db8a5d763baaaeebac3d315ea21f12d3a5a9673;hb=0127d64b8cadd28f2306f416058557dd8622c160;hpb=257c0debc71ed7c496d55547ad2ee88cd9d546a1 diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index 6db8a5d..ecc97da 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -76,7 +76,6 @@ extern struct lnet the_lnet; /* THE network */ /* default timeout */ #define DEFAULT_PEER_TIMEOUT 180 -#define LNET_LND_DEFAULT_TIMEOUT 5 #ifdef HAVE_KERN_SOCK_GETNAME_2ARGS #define lnet_kernel_getpeername(sock, addr, addrlen) \ @@ -375,7 +374,7 @@ lnet_msg_alloc(void) { struct lnet_msg *msg; - msg = kmem_cache_alloc(lnet_msg_cachep, GFP_NOFS | __GFP_ZERO); + msg = kmem_cache_zalloc(lnet_msg_cachep, GFP_NOFS); return (msg); } @@ -392,7 +391,7 @@ lnet_rspt_alloc(int cpt) { struct lnet_rsp_tracker *rspt; - rspt = kmem_cache_alloc(lnet_rspt_cachep, GFP_NOFS | __GFP_ZERO); + rspt = kmem_cache_zalloc(lnet_rspt_cachep, GFP_NOFS); if (rspt) { lnet_net_lock(cpt); the_lnet.ln_counters[cpt]->lct_health.lch_rst_alloc++; @@ -653,10 +652,6 @@ void lnet_counters_get(struct lnet_counters *counters); void lnet_counters_reset(void); unsigned int lnet_iov_nob(unsigned int niov, struct kvec *iov); -int lnet_extract_iov(int dst_niov, struct kvec *dst, - int src_niov, struct kvec *src, - unsigned int offset, unsigned int len); - unsigned int lnet_kiov_nob(unsigned int niov, struct bio_vec *iov); int lnet_extract_kiov(int dst_niov, struct bio_vec *dst, int src_niov, struct bio_vec *src, @@ -680,17 +675,6 @@ void lnet_copy_kiov2kiov(unsigned int ndkiov, struct bio_vec *dkiov, unsigned int soffset, unsigned int nob); static inline void -lnet_copy_iov2flat(int dlen, void *dest, unsigned int doffset, - unsigned int nsiov, struct kvec *siov, unsigned int soffset, - unsigned int nob) -{ - struct kvec diov = { .iov_base = dest, .iov_len = dlen }; - - lnet_copy_iov2iov(1, &diov, doffset, - nsiov, siov, soffset, nob); -} - -static inline void lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset, unsigned int nsiov, struct bio_vec *skiov, unsigned int soffset, unsigned int nob) @@ -702,16 +686,6 @@ lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset, } static inline void -lnet_copy_flat2iov(unsigned int ndiov, struct kvec *diov, unsigned int doffset, - int slen, void *src, unsigned int soffset, - unsigned int nob) -{ - struct kvec siov = { .iov_base = src, .iov_len = slen }; - lnet_copy_iov2iov(ndiov, diov, doffset, - 1, &siov, soffset, nob); -} - -static inline void lnet_copy_flat2kiov(unsigned int ndiov, struct bio_vec *dkiov, unsigned int doffset, int slen, void *src, unsigned int soffset, unsigned int nob)