From: phil Date: Tue, 27 Jan 2004 19:28:28 +0000 (+0000) Subject: update b_size from HEAD X-Git-Tag: v1_7_70~2^33~36 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=12425b16a8d351f104e405cfd1caa43b9e233ea5;p=fs%2Flustre-release.git update b_size from HEAD --- diff --git a/lnet/configure.in b/lnet/configure.in index 44657e0..bacf532 100644 --- a/lnet/configure.in +++ b/lnet/configure.in @@ -29,6 +29,6 @@ AM_CONFIG_HEADER(include/config.h) AC_OUTPUT([Makefile Kernelenv libcfs/Makefile portals/Makefile \ unals/Makefile knals/Makefile router/Makefile \ knals/socknal/Makefile knals/gmnal/Makefile knals/qswnal/Makefile \ - knals/scimacnal/Makefile knals/toenal/Makefile knals/ibnal/Makefile\ + knals/scimacnal/Makefile knals/ibnal/Makefile\ utils/Makefile tests/Makefile doc/Makefile ]) diff --git a/lnet/klnds/Makefile.am b/lnet/klnds/Makefile.am index 25aab9d..df6ee5c 100644 --- a/lnet/klnds/Makefile.am +++ b/lnet/klnds/Makefile.am @@ -3,5 +3,5 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -DIST_SUBDIRS= socknal toenal qswnal gmnal scimacnal ibnal -SUBDIRS= socknal toenal @QSWNAL@ @GMNAL@ @SCIMACNAL@ @IBNAL@ +DIST_SUBDIRS= socknal qswnal gmnal scimacnal ibnal +SUBDIRS= socknal @QSWNAL@ @GMNAL@ @SCIMACNAL@ @IBNAL@ diff --git a/lnet/klnds/toelnd/toenal.h b/lnet/klnds/toelnd/toenal.h deleted file mode 100644 index b211d6c..0000000 --- a/lnet/klnds/toelnd/toenal.h +++ /dev/null @@ -1,236 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * Author: Zach Brown - * Author: Peter J. Braam - * Author: Phil Schwan - * Author: Eric Barton - * Author: Kedar Sovani - * Author: Amey Inamdar - * - * This file is part of Portals, http://www.sf.net/projects/lustre/ - * - * Portals is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Portals is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Portals; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#define DEBUG_PORTAL_ALLOC -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#define DEBUG_SUBSYSTEM S_SOCKNAL - -#include -#include -#include - -#define SOCKNAL_NLTXS 128 /* # normal transmit messages */ -#define SOCKNAL_NNBLK_LTXS 128 /* # transmit messages reserved if can't block */ - -#define SOCKNAL_SMALL_FWD_NMSGS 128 /* # small messages I can be forwarding at any time */ -#define SOCKNAL_LARGE_FWD_NMSGS 32 /* # large messages I can be forwarding at any time */ - -#define SOCKNAL_SMALL_FWD_PAGES 1 /* # pages in a small message fwd buffer */ - -#define SOCKNAL_LARGE_FWD_PAGES (PAGE_ALIGN (sizeof (ptl_hdr_t) + PTL_MTU) >> PAGE_SHIFT) - /* # pages in a large message fwd buffer */ - -#define SOCKNAL_RESCHED 100 /* # scheduler loops before reschedule */ - -#define SOCKNAL_TX_LOW_WATER(sk) (((sk)->sndbuf*8)/10) - -#define TOENAL_N_SCHED 1 - -typedef struct /* pool of forwarding buffers */ -{ - struct list_head fmp_idle_fmbs; /* buffers waiting for a connection */ - struct list_head fmp_blocked_conns; /* connections waiting for a buffer */ -} ksock_fmb_pool_t; - -typedef struct { - int ksnd_init; /* initialisation state */ - - struct list_head ksnd_socklist; /* all my connections */ - rwlock_t ksnd_socklist_lock; /* stabilise add/find/remove */ - - - ptl_nid_t ksnd_mynid; - nal_cb_t *ksnd_nal_cb; - spinlock_t ksnd_nal_cb_lock; /* lib cli/sti lock */ - - atomic_t ksnd_nthreads; /* # live threads */ - int ksnd_shuttingdown; /* tell threads to exit */ - - kpr_router_t ksnd_router; /* THE router */ - - spinlock_t ksnd_sched_lock; /* serialise packet scheduling */ - wait_queue_head_t ksnd_sched_waitq; /* where scheduler(s) wait */ - - struct list_head ksnd_rx_conns; /* conn waiting to be read */ - struct list_head ksnd_tx_conns; /* conn waiting to be written */ - - void *ksnd_fmbs; /* all the pre-allocated FMBs */ - ksock_fmb_pool_t ksnd_small_fmp; /* small message forwarding buffers */ - ksock_fmb_pool_t ksnd_large_fmp; /* large message forwarding buffers */ - - void *ksnd_ltxs; /* all the pre-allocated LTXs */ - struct list_head ksnd_idle_ltx_list; /* where to get an idle LTX */ - struct list_head ksnd_idle_nblk_ltx_list; /* where to get an idle LTX if you can't block */ - wait_queue_head_t ksnd_idle_ltx_waitq; /* where to block for an idle LTX */ - - struct list_head ksnd_reaper_list; /* conn waiting to be reaped */ - wait_queue_head_t ksnd_reaper_waitq; /* reaper sleeps here */ - spinlock_t ksnd_reaper_lock; /* serialise */ - - struct task_struct *ksnd_pollthread_tsk;/* task_struct for the poll thread */ - poll_table ksnd_pwait; /* poll wait table for the socket */ - int ksnd_slistchange; /* informs the pollthread that - * the socklist has changed */ -} ksock_nal_data_t; - -#define SOCKNAL_INIT_NOTHING 0 -#define SOCKNAL_INIT_DATA 1 -#define SOCKNAL_INIT_PTL 2 -#define SOCKNAL_INIT_ALL 3 - -typedef struct /* transmit packet */ -{ - struct list_head tx_list; /* queue on conn for transmission etc */ - char tx_isfwd; /* forwarding / sourced here */ - int tx_nob; /* # packet bytes */ - int tx_niov; /* # packet frags */ - struct iovec *tx_iov; /* packet frags */ -} ksock_tx_t; - -typedef struct /* locally transmitted packet */ -{ - ksock_tx_t ltx_tx; /* send info */ - struct list_head *ltx_idle; /* where to put when idle */ - void *ltx_private; /* lib_finalize() callback arg */ - void *ltx_cookie; /* lib_finalize() callback arg */ - struct iovec ltx_iov[1 + PTL_MD_MAX_IOV]; /* msg frags */ - ptl_hdr_t ltx_hdr; /* buffer for packet header */ -} ksock_ltx_t; - -#define KSOCK_TX_2_KPR_FWD_DESC(ptr) list_entry (ptr, kpr_fwd_desc_t, kprfd_scratch) -/* forwarded packets (router->socknal) embedded in kpr_fwd_desc_t::kprfd_scratch */ - -#define KSOCK_TX_2_KSOCK_LTX(ptr) list_entry (ptr, ksock_ltx_t, ltx_tx) -/* local packets (lib->socknal) embedded in ksock_ltx_t::ltx_tx */ - -/* NB list_entry() is used here as convenient macro for calculating a - * pointer to a struct from the addres of a member. - */ - -typedef struct /* Kernel portals Socket Forwarding message buffer */ -{ /* (socknal->router) */ - struct list_head fmb_list; /* queue idle */ - kpr_fwd_desc_t fmb_fwd; /* router's descriptor */ - int fmb_npages; /* # pages allocated */ - ksock_fmb_pool_t *fmb_pool; /* owning pool */ - struct page *fmb_pages[SOCKNAL_LARGE_FWD_PAGES]; - struct iovec fmb_iov[SOCKNAL_LARGE_FWD_PAGES]; -} ksock_fmb_t; - -#define SOCKNAL_RX_HEADER 1 /* reading header */ -#define SOCKNAL_RX_BODY 2 /* reading body (to deliver here) */ -#define SOCKNAL_RX_BODY_FWD 3 /* reading body (to forward) */ -#define SOCKNAL_RX_SLOP 4 /* skipping body */ -#define SOCKNAL_RX_GET_FMB 5 /* scheduled for forwarding */ -#define SOCKNAL_RX_FMB_SLEEP 6 /* blocked waiting for a fwd desc */ - -typedef struct -{ - struct list_head ksnc_list; /* stash on global socket list */ - struct file *ksnc_file; /* socket filp */ - struct socket *ksnc_sock; /* socket */ - ptl_nid_t ksnc_peernid; /* who's on the other end */ - atomic_t ksnc_refcount; /* # users */ - - /* READER */ - struct list_head ksnc_rx_list; /* where I enq waiting input or a forwarding descriptor */ - unsigned long ksnc_rx_ready; /* data ready to read */ - int ksnc_rx_scheduled; /* being progressed */ - int ksnc_rx_state; /* what is being read */ - int ksnc_rx_nob_left; /* # bytes to next hdr/body */ - int ksnc_rx_nob_wanted; /* bytes actually wanted */ - int ksnc_rx_niov; /* # frags */ - struct iovec ksnc_rx_iov[1 + PTL_MD_MAX_IOV]; /* the frags */ - - void *ksnc_cookie; /* rx lib_finalize passthru arg */ - ptl_hdr_t ksnc_hdr; /* where I read headers into */ - - /* WRITER */ - struct list_head ksnc_tx_list; /* where I enq waiting for output space */ - struct list_head ksnc_tx_queue; /* packets waiting to be sent */ - unsigned long ksnc_tx_ready; /* write space */ - int ksnc_tx_scheduled; /* being progressed */ - -} ksock_conn_t; - -extern int ktoenal_add_sock (ptl_nid_t nid, int fd); -extern int ktoenal_close_sock(ptl_nid_t nid); -extern int ktoenal_set_mynid(ptl_nid_t nid); -extern int ktoenal_push_sock(ptl_nid_t nid); -extern ksock_conn_t *ktoenal_get_conn (ptl_nid_t nid); -extern void _ktoenal_put_conn (ksock_conn_t *conn); -extern void ktoenal_close_conn (ksock_conn_t *conn); - -static inline void -ktoenal_put_conn (ksock_conn_t *conn) -{ - CDEBUG (D_OTHER, "putting conn[%p] -> "LPX64" (%d)\n", - conn, conn->ksnc_peernid, atomic_read (&conn->ksnc_refcount)); - - if (atomic_dec_and_test (&conn->ksnc_refcount)) - _ktoenal_put_conn (conn); -} - -extern int ktoenal_thread_start (int (*fn)(void *arg), void *arg); -extern int ktoenal_new_packet (ksock_conn_t *conn, int skip); -extern void ktoenal_fwd_packet (void *arg, kpr_fwd_desc_t *fwd); -extern int ktoenal_scheduler (void *arg); -extern int ktoenal_reaper (void *arg); -extern int ktoenal_pollthread (void *arg); -extern void ktoenal_data_ready(ksock_conn_t *conn); -extern void ktoenal_write_space(ksock_conn_t *conn); - - -extern nal_cb_t ktoenal_lib; -extern ksock_nal_data_t ktoenal_data; diff --git a/lnet/tests/startclient.sh b/lnet/tests/startclient.sh index de01bc7..be60509 100644 --- a/lnet/tests/startclient.sh +++ b/lnet/tests/startclient.sh @@ -9,13 +9,6 @@ else fi case "$1" in - toe) - /sbin/insmod ../oslib/portals.o - /sbin/insmod ../toenal/ktoenal.o - /sbin/insmod ./$PING - echo ktoenal > /tmp/nal - ;; - tcp) /sbin/insmod ../oslib/portals.o /sbin/insmod ../socknal/ksocknal.o @@ -38,7 +31,7 @@ case "$1" in ;; *) - echo "Usage : ${0} < tcp | toe | elan | gm>" + echo "Usage : ${0} < tcp | elan | gm>" exit 1; esac exit 0; diff --git a/lnet/tests/startserver.sh b/lnet/tests/startserver.sh index 4f66eeb..9b5ccf6 100644 --- a/lnet/tests/startserver.sh +++ b/lnet/tests/startserver.sh @@ -9,13 +9,6 @@ else fi case "$1" in - toe) - /sbin/insmod ../oslib/portals.o - /sbin/insmod ../toenal/ktoenal.o - /sbin/insmod ./$PING nal=4 - echo ktoenal > /tmp/nal - ;; - tcp) /sbin/insmod ../oslib/portals.o /sbin/insmod ../socknal/ksocknal.o @@ -38,7 +31,7 @@ case "$1" in ;; *) - echo "Usage : ${0} < tcp | toe | elan | gm>" + echo "Usage : ${0} < tcp | elan | gm>" exit 1; esac ../utils/acceptor 9999& diff --git a/lustre/kernel_patches/kernel_configs/config-linux-2.4.20-uml b/lustre/kernel_patches/kernel_configs/config-linux-2.4.20-uml index 489ea8b..4a63c18 100644 --- a/lustre/kernel_patches/kernel_configs/config-linux-2.4.20-uml +++ b/lustre/kernel_patches/kernel_configs/config-linux-2.4.20-uml @@ -37,7 +37,7 @@ CONFIG_NEST_LEVEL=0 CONFIG_KERNEL_HALF_GIGS=1 # CONFIG_HIGHMEM is not set # CONFIG_PROC_MM is not set -CONFIG_KERNEL_STACK_ORDER=2 +CONFIG_KERNEL_STACK_ORDER=3 # # Loadable module support diff --git a/lustre/liblustre/llite_lib.c b/lustre/liblustre/llite_lib.c index ec0d06c..baf564a 100644 --- a/lustre/liblustre/llite_lib.c +++ b/lustre/liblustre/llite_lib.c @@ -98,7 +98,6 @@ char *portals_nid2str(int nal, ptl_nid_t nid, char *str) case QSWNAL: case GMNAL: case IBNAL: - case TOENAL: case SCIMACNAL: sprintf(str, "%u:%u", (__u32)(nid >> 32), (__u32)nid); break; diff --git a/lustre/portals/configure.in b/lustre/portals/configure.in index 44657e0..bacf532 100644 --- a/lustre/portals/configure.in +++ b/lustre/portals/configure.in @@ -29,6 +29,6 @@ AM_CONFIG_HEADER(include/config.h) AC_OUTPUT([Makefile Kernelenv libcfs/Makefile portals/Makefile \ unals/Makefile knals/Makefile router/Makefile \ knals/socknal/Makefile knals/gmnal/Makefile knals/qswnal/Makefile \ - knals/scimacnal/Makefile knals/toenal/Makefile knals/ibnal/Makefile\ + knals/scimacnal/Makefile knals/ibnal/Makefile\ utils/Makefile tests/Makefile doc/Makefile ]) diff --git a/lustre/portals/knals/Makefile.am b/lustre/portals/knals/Makefile.am index 25aab9d..df6ee5c 100644 --- a/lustre/portals/knals/Makefile.am +++ b/lustre/portals/knals/Makefile.am @@ -3,5 +3,5 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -DIST_SUBDIRS= socknal toenal qswnal gmnal scimacnal ibnal -SUBDIRS= socknal toenal @QSWNAL@ @GMNAL@ @SCIMACNAL@ @IBNAL@ +DIST_SUBDIRS= socknal qswnal gmnal scimacnal ibnal +SUBDIRS= socknal @QSWNAL@ @GMNAL@ @SCIMACNAL@ @IBNAL@ diff --git a/lustre/portals/knals/toenal/toenal.h b/lustre/portals/knals/toenal/toenal.h deleted file mode 100644 index b211d6c..0000000 --- a/lustre/portals/knals/toenal/toenal.h +++ /dev/null @@ -1,236 +0,0 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * - * Copyright (C) 2001, 2002 Cluster File Systems, Inc. - * Author: Zach Brown - * Author: Peter J. Braam - * Author: Phil Schwan - * Author: Eric Barton - * Author: Kedar Sovani - * Author: Amey Inamdar - * - * This file is part of Portals, http://www.sf.net/projects/lustre/ - * - * Portals is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * Portals is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Portals; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#define DEBUG_PORTAL_ALLOC -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#define DEBUG_SUBSYSTEM S_SOCKNAL - -#include -#include -#include - -#define SOCKNAL_NLTXS 128 /* # normal transmit messages */ -#define SOCKNAL_NNBLK_LTXS 128 /* # transmit messages reserved if can't block */ - -#define SOCKNAL_SMALL_FWD_NMSGS 128 /* # small messages I can be forwarding at any time */ -#define SOCKNAL_LARGE_FWD_NMSGS 32 /* # large messages I can be forwarding at any time */ - -#define SOCKNAL_SMALL_FWD_PAGES 1 /* # pages in a small message fwd buffer */ - -#define SOCKNAL_LARGE_FWD_PAGES (PAGE_ALIGN (sizeof (ptl_hdr_t) + PTL_MTU) >> PAGE_SHIFT) - /* # pages in a large message fwd buffer */ - -#define SOCKNAL_RESCHED 100 /* # scheduler loops before reschedule */ - -#define SOCKNAL_TX_LOW_WATER(sk) (((sk)->sndbuf*8)/10) - -#define TOENAL_N_SCHED 1 - -typedef struct /* pool of forwarding buffers */ -{ - struct list_head fmp_idle_fmbs; /* buffers waiting for a connection */ - struct list_head fmp_blocked_conns; /* connections waiting for a buffer */ -} ksock_fmb_pool_t; - -typedef struct { - int ksnd_init; /* initialisation state */ - - struct list_head ksnd_socklist; /* all my connections */ - rwlock_t ksnd_socklist_lock; /* stabilise add/find/remove */ - - - ptl_nid_t ksnd_mynid; - nal_cb_t *ksnd_nal_cb; - spinlock_t ksnd_nal_cb_lock; /* lib cli/sti lock */ - - atomic_t ksnd_nthreads; /* # live threads */ - int ksnd_shuttingdown; /* tell threads to exit */ - - kpr_router_t ksnd_router; /* THE router */ - - spinlock_t ksnd_sched_lock; /* serialise packet scheduling */ - wait_queue_head_t ksnd_sched_waitq; /* where scheduler(s) wait */ - - struct list_head ksnd_rx_conns; /* conn waiting to be read */ - struct list_head ksnd_tx_conns; /* conn waiting to be written */ - - void *ksnd_fmbs; /* all the pre-allocated FMBs */ - ksock_fmb_pool_t ksnd_small_fmp; /* small message forwarding buffers */ - ksock_fmb_pool_t ksnd_large_fmp; /* large message forwarding buffers */ - - void *ksnd_ltxs; /* all the pre-allocated LTXs */ - struct list_head ksnd_idle_ltx_list; /* where to get an idle LTX */ - struct list_head ksnd_idle_nblk_ltx_list; /* where to get an idle LTX if you can't block */ - wait_queue_head_t ksnd_idle_ltx_waitq; /* where to block for an idle LTX */ - - struct list_head ksnd_reaper_list; /* conn waiting to be reaped */ - wait_queue_head_t ksnd_reaper_waitq; /* reaper sleeps here */ - spinlock_t ksnd_reaper_lock; /* serialise */ - - struct task_struct *ksnd_pollthread_tsk;/* task_struct for the poll thread */ - poll_table ksnd_pwait; /* poll wait table for the socket */ - int ksnd_slistchange; /* informs the pollthread that - * the socklist has changed */ -} ksock_nal_data_t; - -#define SOCKNAL_INIT_NOTHING 0 -#define SOCKNAL_INIT_DATA 1 -#define SOCKNAL_INIT_PTL 2 -#define SOCKNAL_INIT_ALL 3 - -typedef struct /* transmit packet */ -{ - struct list_head tx_list; /* queue on conn for transmission etc */ - char tx_isfwd; /* forwarding / sourced here */ - int tx_nob; /* # packet bytes */ - int tx_niov; /* # packet frags */ - struct iovec *tx_iov; /* packet frags */ -} ksock_tx_t; - -typedef struct /* locally transmitted packet */ -{ - ksock_tx_t ltx_tx; /* send info */ - struct list_head *ltx_idle; /* where to put when idle */ - void *ltx_private; /* lib_finalize() callback arg */ - void *ltx_cookie; /* lib_finalize() callback arg */ - struct iovec ltx_iov[1 + PTL_MD_MAX_IOV]; /* msg frags */ - ptl_hdr_t ltx_hdr; /* buffer for packet header */ -} ksock_ltx_t; - -#define KSOCK_TX_2_KPR_FWD_DESC(ptr) list_entry (ptr, kpr_fwd_desc_t, kprfd_scratch) -/* forwarded packets (router->socknal) embedded in kpr_fwd_desc_t::kprfd_scratch */ - -#define KSOCK_TX_2_KSOCK_LTX(ptr) list_entry (ptr, ksock_ltx_t, ltx_tx) -/* local packets (lib->socknal) embedded in ksock_ltx_t::ltx_tx */ - -/* NB list_entry() is used here as convenient macro for calculating a - * pointer to a struct from the addres of a member. - */ - -typedef struct /* Kernel portals Socket Forwarding message buffer */ -{ /* (socknal->router) */ - struct list_head fmb_list; /* queue idle */ - kpr_fwd_desc_t fmb_fwd; /* router's descriptor */ - int fmb_npages; /* # pages allocated */ - ksock_fmb_pool_t *fmb_pool; /* owning pool */ - struct page *fmb_pages[SOCKNAL_LARGE_FWD_PAGES]; - struct iovec fmb_iov[SOCKNAL_LARGE_FWD_PAGES]; -} ksock_fmb_t; - -#define SOCKNAL_RX_HEADER 1 /* reading header */ -#define SOCKNAL_RX_BODY 2 /* reading body (to deliver here) */ -#define SOCKNAL_RX_BODY_FWD 3 /* reading body (to forward) */ -#define SOCKNAL_RX_SLOP 4 /* skipping body */ -#define SOCKNAL_RX_GET_FMB 5 /* scheduled for forwarding */ -#define SOCKNAL_RX_FMB_SLEEP 6 /* blocked waiting for a fwd desc */ - -typedef struct -{ - struct list_head ksnc_list; /* stash on global socket list */ - struct file *ksnc_file; /* socket filp */ - struct socket *ksnc_sock; /* socket */ - ptl_nid_t ksnc_peernid; /* who's on the other end */ - atomic_t ksnc_refcount; /* # users */ - - /* READER */ - struct list_head ksnc_rx_list; /* where I enq waiting input or a forwarding descriptor */ - unsigned long ksnc_rx_ready; /* data ready to read */ - int ksnc_rx_scheduled; /* being progressed */ - int ksnc_rx_state; /* what is being read */ - int ksnc_rx_nob_left; /* # bytes to next hdr/body */ - int ksnc_rx_nob_wanted; /* bytes actually wanted */ - int ksnc_rx_niov; /* # frags */ - struct iovec ksnc_rx_iov[1 + PTL_MD_MAX_IOV]; /* the frags */ - - void *ksnc_cookie; /* rx lib_finalize passthru arg */ - ptl_hdr_t ksnc_hdr; /* where I read headers into */ - - /* WRITER */ - struct list_head ksnc_tx_list; /* where I enq waiting for output space */ - struct list_head ksnc_tx_queue; /* packets waiting to be sent */ - unsigned long ksnc_tx_ready; /* write space */ - int ksnc_tx_scheduled; /* being progressed */ - -} ksock_conn_t; - -extern int ktoenal_add_sock (ptl_nid_t nid, int fd); -extern int ktoenal_close_sock(ptl_nid_t nid); -extern int ktoenal_set_mynid(ptl_nid_t nid); -extern int ktoenal_push_sock(ptl_nid_t nid); -extern ksock_conn_t *ktoenal_get_conn (ptl_nid_t nid); -extern void _ktoenal_put_conn (ksock_conn_t *conn); -extern void ktoenal_close_conn (ksock_conn_t *conn); - -static inline void -ktoenal_put_conn (ksock_conn_t *conn) -{ - CDEBUG (D_OTHER, "putting conn[%p] -> "LPX64" (%d)\n", - conn, conn->ksnc_peernid, atomic_read (&conn->ksnc_refcount)); - - if (atomic_dec_and_test (&conn->ksnc_refcount)) - _ktoenal_put_conn (conn); -} - -extern int ktoenal_thread_start (int (*fn)(void *arg), void *arg); -extern int ktoenal_new_packet (ksock_conn_t *conn, int skip); -extern void ktoenal_fwd_packet (void *arg, kpr_fwd_desc_t *fwd); -extern int ktoenal_scheduler (void *arg); -extern int ktoenal_reaper (void *arg); -extern int ktoenal_pollthread (void *arg); -extern void ktoenal_data_ready(ksock_conn_t *conn); -extern void ktoenal_write_space(ksock_conn_t *conn); - - -extern nal_cb_t ktoenal_lib; -extern ksock_nal_data_t ktoenal_data; diff --git a/lustre/portals/tests/startclient.sh b/lustre/portals/tests/startclient.sh index de01bc7..be60509 100755 --- a/lustre/portals/tests/startclient.sh +++ b/lustre/portals/tests/startclient.sh @@ -9,13 +9,6 @@ else fi case "$1" in - toe) - /sbin/insmod ../oslib/portals.o - /sbin/insmod ../toenal/ktoenal.o - /sbin/insmod ./$PING - echo ktoenal > /tmp/nal - ;; - tcp) /sbin/insmod ../oslib/portals.o /sbin/insmod ../socknal/ksocknal.o @@ -38,7 +31,7 @@ case "$1" in ;; *) - echo "Usage : ${0} < tcp | toe | elan | gm>" + echo "Usage : ${0} < tcp | elan | gm>" exit 1; esac exit 0; diff --git a/lustre/portals/tests/startserver.sh b/lustre/portals/tests/startserver.sh index 4f66eeb..9b5ccf6 100755 --- a/lustre/portals/tests/startserver.sh +++ b/lustre/portals/tests/startserver.sh @@ -9,13 +9,6 @@ else fi case "$1" in - toe) - /sbin/insmod ../oslib/portals.o - /sbin/insmod ../toenal/ktoenal.o - /sbin/insmod ./$PING nal=4 - echo ktoenal > /tmp/nal - ;; - tcp) /sbin/insmod ../oslib/portals.o /sbin/insmod ../socknal/ksocknal.o @@ -38,7 +31,7 @@ case "$1" in ;; *) - echo "Usage : ${0} < tcp | toe | elan | gm>" + echo "Usage : ${0} < tcp | elan | gm>" exit 1; esac ../utils/acceptor 9999& diff --git a/lustre/ptlrpc/Makefile.mk b/lustre/ptlrpc/Makefile.mk index a2801c8..888e1bc 100644 --- a/lustre/ptlrpc/Makefile.mk +++ b/lustre/ptlrpc/Makefile.mk @@ -8,4 +8,5 @@ include $(src)/../portals/Kernelenv obj-y += ptlrpc.o ptlrpc-objs := recover.o connection.o ptlrpc_module.o events.o service.o \ client.o niobuf.o pack_generic.o lproc_ptlrpc.o pinger.o \ - recov_thread.o ptlrpc_lib.o import.o llog_net.o llogd.o + recov_thread.o import.o llog_net.o llog_client.o \ + llog_server.o ptlrpcd.o diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 20aecdf..034ee8a 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -52,13 +52,20 @@ if [ "$ONLY" == "cleanup" ]; then exit fi -gen_config +SETUP=${SETUP:-"setup"} +CLEANUP=${CLEANUP:-"cleanup"} -start ost --reformat $OSTLCONFARGS -start ost2 --reformat $OSTLCONFARGS -[ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE -start mds $MDSLCONFARGS --reformat -zconf_mount $MOUNT +setup() { + gen_config + + start ost --reformat $OSTLCONFARGS + start ost2 --reformat $OSTLCONFARGS + [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE + start mds $MDSLCONFARGS --reformat + zconf_mount $MOUNT +} + +$SETUP if [ "$ONLY" == "setup" ]; then exit 0 @@ -646,8 +653,7 @@ test_34() { fail_abort mds kill -USR1 $pid [ -e $DIR/$tfile ] && return 1 - sleep 3 - # wait for commitment of removal + sync return 0 } run_test 34 "abort recovery before client does replay (test mds_cleanup_orphans)" @@ -665,5 +671,41 @@ test_35() { } run_test 35 "test recovery from llog for unlink op" +# b=2432 resent cancel after replay uses wrong cookie, +# so don't resend cancels +test_36() { + replay_barrier mds + touch $DIR/$tfile + checkstat $DIR/$tfile + facet_failover mds + cancel_lru_locks MDC + if dmesg | grep "unknown lock cookie"; then + echo "cancel after replay failed" + return 1 + fi +} +run_test 36 "don't resend cancel" + +# b=2368 +# directory orphans can't be unlinked from PENDING directory +test_37() { + rmdir $DIR/$tfile 2>/dev/null + multiop $DIR/$tfile dD_c & + pid=$! + # give multiop a chance to open + sleep 1 + rmdir $DIR/$tfile + + replay_barrier mds + # clear the dmesg buffer so we only see errors from this recovery + dmesg -c >/dev/null + fail_abort mds + kill -USR1 $pid + dmesg | grep "mds_unlink_orphan.*error .* unlinking orphan" && return 1 + sync + return 0 +} +run_test 37 "abort recovery before client does replay (test mds_cleanup_orphans for directories)" + equals_msg test complete, cleaning up -cleanup +$CLEANUP