From bda9e3e744cddd2397a8324e4b2e879e3228fae8 Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Tue, 22 Jun 2010 00:25:02 +0200 Subject: [PATCH] Revert "b=21951 Init scatterlist table." This reverts commit f1480c8eec3618567288e75b5ce756b519ca9447. This is suspected to cause bug 23123. --- lnet/autoconf/lustre-lnet.m4 | 17 ----------------- lnet/include/libcfs/linux/portals_compat25.h | 4 ---- lnet/klnds/o2iblnd/o2iblnd_cb.c | 25 +------------------------ lustre/autoconf/lustre-core.m4 | 3 +-- 4 files changed, 2 insertions(+), 47 deletions(-) diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index fc7f877..855baf3 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -1534,22 +1534,6 @@ LB_LINUX_TRY_COMPILE([ ]) ]) -# from 2.6.24 please use sg_init_table -AC_DEFUN([LN_SCATTERLIST_INITTABLE], -[AC_MSG_CHECKING([if sg_init_table is defined]) -LB_LINUX_TRY_COMPILE([ - #include -],[ - sg_init_table(NULL,0); -],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SCATTERLIST_INITTABLE, 1, - [sg_init_table is defined]) -],[ - AC_MSG_RESULT(NO) -]) -]) - # # LN_PROG_LINUX # @@ -1597,7 +1581,6 @@ LN_KMEM_CACHE_CREATE_DTOR # 2.6.24 LN_SYSCTL_UNNUMBERED LN_SCATTERLIST_SETPAGE -LN_SCATTERLIST_INITTABLE # 2.6.26 LN_SEM_COUNT # 2.6.27 diff --git a/lnet/include/libcfs/linux/portals_compat25.h b/lnet/include/libcfs/linux/portals_compat25.h index 455151b..60755ea 100644 --- a/lnet/include/libcfs/linux/portals_compat25.h +++ b/lnet/include/libcfs/linux/portals_compat25.h @@ -175,8 +175,4 @@ int proc_call_handler(void *data, int write, loff_t pos, void *buffer, int len)); -#ifndef HAVE_SCATTERLIST_INITTABLE -#define sg_init_table(sgl, n) memset(sgl, 0, sizeof(*sgl) * n) -#endif - #endif /* _PORTALS_COMPAT_H */ diff --git a/lnet/klnds/o2iblnd/o2iblnd_cb.c b/lnet/klnds/o2iblnd/o2iblnd_cb.c index 4b5be58..638ffc5 100644 --- a/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -710,28 +710,6 @@ kiblnd_setup_rd_iov(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, return kiblnd_map_tx(ni, tx, rd, sg - tx->tx_frags); } -static inline int -get_kiov_length (int nkiov, lnet_kiov_t *kiov, int offset, int nob) -{ - int fragnob; - int count = 0; - - do { - LASSERT (nkiov > 0); - - fragnob = min((int)(kiov->kiov_len - offset), nob); - - count++; - - offset = 0; - kiov++; - nkiov--; - nob -= fragnob; - } while (nob > 0); - - return count; -} - int kiblnd_setup_rd_kiov (lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, int nkiov, lnet_kiov_t *kiov, int offset, int nob) @@ -754,13 +732,12 @@ kiblnd_setup_rd_kiov (lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, } sg = tx->tx_frags; - tx->tx_nfrags = get_kiov_length(nkiov, kiov, offset, nob); - sg_init_table(sg, tx->tx_nfrags); do { LASSERT (nkiov > 0); fragnob = min((int)(kiov->kiov_len - offset), nob); + memset(sg, 0, sizeof(*sg)); sg_set_page(sg, kiov->kiov_page, fragnob, kiov->kiov_offset + offset); sg++; diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 814a5d6..c63e6b4 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -420,7 +420,6 @@ AC_DEFUN([LC_POSIX_ACL_XATTR_H], [LB_CHECK_FILE([$LINUX/include/linux/posix_acl_xattr.h],[ AC_MSG_CHECKING([if linux/posix_acl_xattr.h can be compiled]) LB_LINUX_TRY_COMPILE([ - #include #include ],[],[ AC_MSG_RESULT([yes]) @@ -431,7 +430,7 @@ AC_DEFUN([LC_POSIX_ACL_XATTR_H], ]) $1 ],[ - AC_MSG_RESULT([no]) +AC_MSG_RESULT([no]) ]) ]) -- 1.8.3.1