From: Mr NeilBrown Date: Wed, 4 Dec 2019 05:34:47 +0000 (+1100) Subject: LU-13004 lnet: remove lnet_copy_flat2iov and ..iov2flat X-Git-Tag: 2.13.54~53 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=12af05194ad71c5278a5943035a3da8200fac969 LU-13004 lnet: remove lnet_copy_flat2iov and ..iov2flat This functions are no longer used, so remove them. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: I748643c38430ddb21f35493f0ef704528167716f Reviewed-on: https://review.whamcloud.com/37849 Reviewed-by: Shaun Tancheff Reviewed-by: James Simmons Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lnet/include/lnet/lib-lnet.h b/lnet/include/lnet/lib-lnet.h index 817dbda..a7b8bc9 100644 --- a/lnet/include/lnet/lib-lnet.h +++ b/lnet/include/lnet/lib-lnet.h @@ -676,17 +676,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) @@ -698,16 +687,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) diff --git a/lnet/klnds/gnilnd/gnilnd_cb.c b/lnet/klnds/gnilnd/gnilnd_cb.c index 36127bc..fa104c6 100644 --- a/lnet/klnds/gnilnd/gnilnd_cb.c +++ b/lnet/klnds/gnilnd/gnilnd_cb.c @@ -2513,16 +2513,10 @@ kgnilnd_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg, } } - if (kiov != NULL) - lnet_copy_flat2kiov( - niov, kiov, offset, - *kgnilnd_tunables.kgn_max_immediate, - &rxmsg[1], 0, mlen); - else - lnet_copy_flat2iov( - niov, NULL, offset, - *kgnilnd_tunables.kgn_max_immediate, - &rxmsg[1], 0, mlen); + lnet_copy_flat2kiov( + niov, kiov, offset, + *kgnilnd_tunables.kgn_max_immediate, + &rxmsg[1], 0, mlen); kgnilnd_consume_rx(rx); lnet_finalize(lntmsg, 0);