Whamcloud - gitweb
landing b_lcfg to b_devel
authorrread <rread>
Wed, 8 Oct 2003 07:07:05 +0000 (07:07 +0000)
committerrread <rread>
Wed, 8 Oct 2003 07:07:05 +0000 (07:07 +0000)
- llog network api for processing the log from the client
- config messages changed to use struct lustre_cfg and struct
  portals_cfg
- lctl record options save config messages to log on the mds
- ll_fill_super supports fetching the log and replaying to setup
  the devices needed for mount.
- small changes to lctl interface to support new config protocol.

  - newdev is now a no-op.
  - cfg_device <device name> is used to set the target device for
    detach and cleanup.

34 files changed:
lnet/include/linux/kp30.h
lnet/include/linux/portals_lib.h
lnet/include/lnet/lltrace.h
lnet/include/lnet/lnetctl.h
lnet/include/lnet/ptlctl.h
lnet/klnds/gmlnd/gmlnd_module.c
lnet/klnds/qswlnd/qswlnd.c
lnet/klnds/socklnd/socklnd.c
lnet/klnds/toelnd/toenal.c
lnet/libcfs/module.c
lnet/utils/acceptor.c
lnet/utils/gmlndnid.c
lnet/utils/portals.c
lustre/kernel_patches/patches/2.6.0-test5-mm4.patch
lustre/llite/llite_internal.h
lustre/mdc/mdc_lib.c
lustre/mds/mds_internal.h
lustre/obdfilter/filter_san.c
lustre/osc/osc_lib.c
lustre/portals/include/linux/kp30.h
lustre/portals/include/linux/portals_lib.h
lustre/portals/include/portals/lltrace.h
lustre/portals/include/portals/ptlctl.h
lustre/portals/knals/gmnal/gmnal_module.c
lustre/portals/knals/qswnal/qswnal.c
lustre/portals/knals/socknal/socknal.c
lustre/portals/knals/toenal/toenal.c
lustre/portals/libcfs/module.c
lustre/portals/utils/acceptor.c
lustre/portals/utils/gmnalnid.c
lustre/portals/utils/portals.c
lustre/ptlrpc/ptlrpc_lib.c
lustre/tests/replay-dual.sh
lustre/tests/replay-single.sh

index 6f31b9f..94b61e0 100644 (file)
@@ -755,6 +755,39 @@ do {                                                                    \
  * USER LEVEL STUFF BELOW
  */
 
+#define PORTALS_CFG_VERSION 0x00010001;
+
+struct portals_cfg {
+        __u32 pcfg_version;
+        __u32 pcfg_command;
+
+        __u32 pcfg_nal;
+        __u32 pcfg_flags;
+
+        __u64 pcfg_nid;
+        __u64 pcfg_nid2;
+        __u64 pcfg_nid3;
+        __u32 pcfg_id;
+        __u32 pcfg_misc;
+        __u32 pcfg_fd;
+        __u32 pcfg_count;
+        __u32 pcfg_size;
+        __u32 pcfg_wait;
+
+        __u32 pcfg_plen1; /* buffers in userspace */
+        char *pcfg_pbuf1;
+        __u32 pcfg_plen2; /* buffers in userspace */
+        char *pcfg_pbuf2;
+};
+
+#define PCFG_INIT(pcfg, cmd)                            \
+do {                                                    \
+        memset(&pcfg, 0, sizeof(pcfg));                 \
+        pcfg.pcfg_version = PORTALS_CFG_VERSION;        \
+        pcfg.pcfg_command = (cmd);                      \
+                                                        \
+} while (0)
+
 #define PORTAL_IOCTL_VERSION 0x00010007
 #define PING_SYNC       0
 #define PING_ASYNC      1
@@ -1032,11 +1065,20 @@ struct lustre_peer {
         ptl_handle_ni_t peer_ni;
 };
 
+
 /* module.c */
-typedef int (*nal_cmd_handler_t)(struct portal_ioctl_data *, void * private);
+typedef int (*nal_cmd_handler_t)(struct portals_cfg *, void * private);
 int kportal_nal_register(int nal, nal_cmd_handler_t handler, void * private);
 int kportal_nal_unregister(int nal);
 
+enum cfg_record_type {
+        PORTALS_CFG_TYPE = 1,
+        LUSTRE_CFG_TYPE = 123,
+};
+
+typedef int (*cfg_record_cb_t)(enum cfg_record_type, int len, void *data);
+int kportal_nal_cmd(struct portals_cfg *);
+
 ptl_handle_ni_t *kportal_get_ni (int nal);
 void kportal_put_ni (int nal);
 
index a528a80..14d60c6 100644 (file)
@@ -42,6 +42,11 @@ static inline int size_round (int val)
         return (val + 7) & (~0x7);
 }
 
+static inline int size_round16(int val)
+{
+        return (val + 0xf) & (~0xf);
+}
+
 static inline int size_round0(int val)
 {
         if (!val)
index d389aab..5f266e2 100644 (file)
@@ -18,8 +18,8 @@
 #include <unistd.h>
 #include <sys/time.h>
 #include <portals/types.h>
-#include <portals/ptlctl.h>
 #include <linux/kp30.h>
+#include <portals/ptlctl.h>
 #include <linux/limits.h>
 #include <asm/page.h>
 #include <linux/version.h>
index 7763f1b..0466494 100644 (file)
@@ -71,6 +71,8 @@ int jt_dbg_mark_debug_buf(int argc, char **argv);
 int jt_dbg_modules(int argc, char **argv);
 int jt_dbg_panic(int argc, char **argv);
 
+int ptl_set_cfg_record_cb(cfg_record_cb_t cb);
+
 /* l_ioctl.c */
 int register_ioc_dev(int dev_id, const char * dev_name);
 void unregister_ioc_dev(int dev_id);
index 7763f1b..0466494 100644 (file)
@@ -71,6 +71,8 @@ int jt_dbg_mark_debug_buf(int argc, char **argv);
 int jt_dbg_modules(int argc, char **argv);
 int jt_dbg_panic(int argc, char **argv);
 
+int ptl_set_cfg_record_cb(cfg_record_cb_t cb);
+
 /* l_ioctl.c */
 int register_ioc_dev(int dev_id, const char * dev_name);
 void unregister_ioc_dev(int dev_id);
index 8e0f64c..ae401a8 100644 (file)
@@ -35,7 +35,7 @@ ptl_handle_ni_t       kgmnal_ni;
 
 
 int 
-gmnal_cmd(struct portal_ioctl_data *data, void *private)
+gmnal_cmd(struct portals_cfg *pcfg, void *private)
 {
        gmnal_data_t    *nal_data = NULL;
        char            *name = NULL;
@@ -45,16 +45,16 @@ gmnal_cmd(struct portal_ioctl_data *data, void *private)
 
 
        CDEBUG(D_TRACE, "gmnal_cmd [%d] private [%p]\n", 
-              data->ioc_nal_cmd, private);
+              pcfg->pcfg_command, private);
        nal_data = (gmnal_data_t*)private;
-       switch(data->ioc_nal_cmd) {
+       switch(pcfg->pcfg_command) {
        /*
         * just reuse already defined GET_NID. Should define GMNAL version
         */
        case(GMNAL_IOC_GET_GNID):
 
-               PORTAL_ALLOC(name, data->ioc_plen1);
-               copy_from_user(name, data->ioc_pbuf1, data->ioc_plen1);
+               PORTAL_ALLOC(name, pcfg->pcfg_plen1);
+               copy_from_user(name, pcfg->pcfg_pbuf1, pcfg->pcfg_plen1);
        
                GMNAL_GM_LOCK(nal_data);
                nid = gm_host_name_to_node_id(nal_data->gm_port, name);
@@ -70,11 +70,11 @@ gmnal_cmd(struct portal_ioctl_data *data, void *private)
                        return(-1);
                }
                CDEBUG(D_INFO, "Global node is is [%u][%x]\n", gnid, gnid);
-               copy_to_user(data->ioc_pbuf2, &gnid, data->ioc_plen2);
+               copy_to_user(pcfg->pcfg_pbuf2, &gnid, pcfg->pcfg_plen2);
        break;
        default:
-               CDEBUG(D_INFO, "gmnal_cmd UNKNOWN[%d]\n", data->ioc_nal_cmd);
-               data->ioc_nid2 = -1;
+               CDEBUG(D_INFO, "gmnal_cmd UNKNOWN[%d]\n", pcfg->pcfg_nal_cmd);
+               pcfg->pcfg_nid2 = -1;
        }
 
 
index cdafba9..4472e30 100644 (file)
@@ -113,12 +113,12 @@ kqswnal_init(int interface, ptl_pt_index_t ptl_size, ptl_ac_index_t ac_size,
 }
 
 int
-kqswnal_get_tx_desc (struct portal_ioctl_data *data)
+kqswnal_get_tx_desc (struct portals_cfg *pcfg)
 {
        unsigned long      flags;
        struct list_head  *tmp;
        kqswnal_tx_t      *ktx;
-       int                index = data->ioc_count;
+       int                index = pcfg->pcfg_count;
        int                rc = -ENOENT;
 
        spin_lock_irqsave (&kqswnal_data.kqn_idletxd_lock, flags);
@@ -129,13 +129,13 @@ kqswnal_get_tx_desc (struct portal_ioctl_data *data)
 
                ktx = list_entry (tmp, kqswnal_tx_t, ktx_list);
 
-               data->ioc_pbuf1 = (char *)ktx;
-               data->ioc_count = NTOH__u32(ktx->ktx_wire_hdr->type);
-               data->ioc_size  = NTOH__u32(PTL_HDR_LENGTH(ktx->ktx_wire_hdr));
-               data->ioc_nid   = NTOH__u64(ktx->ktx_wire_hdr->dest_nid);
-               data->ioc_nid2  = ktx->ktx_nid;
-               data->ioc_misc  = ktx->ktx_launcher;
-               data->ioc_flags = (list_empty (&ktx->ktx_delayed_list) ? 0 : 1) |
+               pcfg->pcfg_pbuf1 = (char *)ktx;
+               pcfg->pcfg_count = NTOH__u32(ktx->ktx_wire_hdr->type);
+               pcfg->pcfg_size  = NTOH__u32(PTL_HDR_LENGTH(ktx->ktx_wire_hdr));
+               pcfg->pcfg_nid   = NTOH__u64(ktx->ktx_wire_hdr->dest_nid);
+               pcfg->pcfg_nid2  = ktx->ktx_nid;
+               pcfg->pcfg_misc  = ktx->ktx_launcher;
+               pcfg->pcfg_flags = (list_empty (&ktx->ktx_delayed_list) ? 0 : 1) |
                                  (!ktx->ktx_isnblk                    ? 0 : 2) |
                                  (ktx->ktx_state << 2);
                rc = 0;
@@ -147,21 +147,21 @@ kqswnal_get_tx_desc (struct portal_ioctl_data *data)
 }
 
 int
-kqswnal_cmd (struct portal_ioctl_data *data, void *private)
+kqswnal_cmd (struct portals_cfg *pcfg, void *private)
 {
-       LASSERT (data != NULL);
+       LASSERT (pcfg != NULL);
        
-       switch (data->ioc_nal_cmd) {
+       switch (pcfg->pcfg_command) {
        case NAL_CMD_GET_TXDESC:
-               return (kqswnal_get_tx_desc (data));
+               return (kqswnal_get_tx_desc (pcfg));
 
        case NAL_CMD_REGISTER_MYNID:
                CDEBUG (D_IOCTL, "setting NID offset to "LPX64" (was "LPX64")\n",
-                       data->ioc_nid - kqswnal_data.kqn_elanid,
+                       pcfg->pcfg_nid - kqswnal_data.kqn_elanid,
                        kqswnal_data.kqn_nid_offset);
                kqswnal_data.kqn_nid_offset =
-                       data->ioc_nid - kqswnal_data.kqn_elanid;
-               kqswnal_lib.ni.nid = data->ioc_nid;
+                       pcfg->pcfg_nid - kqswnal_data.kqn_elanid;
+               kqswnal_lib.ni.nid = pcfg->pcfg_nid;
                return (0);
                
        default:
index 33f950e..c72717d 100644 (file)
@@ -1219,27 +1219,27 @@ ksocknal_push (ptl_nid_t nid)
 }
 
 int
-ksocknal_cmd(struct portal_ioctl_data * data, void * private)
+ksocknal_cmd(struct portals_cfg *pcfg, void * private)
 {
         int rc = -EINVAL;
 
-        LASSERT (data != NULL);
+        LASSERT (pcfg != NULL);
 
-        switch(data->ioc_nal_cmd) {
+        switch(pcfg->pcfg_command) {
         case NAL_CMD_GET_AUTOCONN: {
-                ksock_route_t *route = ksocknal_get_route_by_idx (data->ioc_count);
+                ksock_route_t *route = ksocknal_get_route_by_idx (pcfg->pcfg_count);
 
                 if (route == NULL)
                         rc = -ENOENT;
                 else {
                         rc = 0;
-                        data->ioc_nid   = route->ksnr_peer->ksnp_nid;
-                        data->ioc_id    = route->ksnr_ipaddr;
-                        data->ioc_misc  = route->ksnr_port;
-                        data->ioc_count = route->ksnr_generation;
-                        data->ioc_size  = route->ksnr_buffer_size;
-                        data->ioc_wait  = route->ksnr_sharecount;
-                        data->ioc_flags = (route->ksnr_nonagel      ? 1 : 0) |
+                        pcfg->pcfg_nid   = route->ksnr_peer->ksnp_nid;
+                        pcfg->pcfg_id    = route->ksnr_ipaddr;
+                        pcfg->pcfg_misc  = route->ksnr_port;
+                        pcfg->pcfg_count = route->ksnr_generation;
+                        pcfg->pcfg_size  = route->ksnr_buffer_size;
+                        pcfg->pcfg_wait  = route->ksnr_sharecount;
+                        pcfg->pcfg_flags = (route->ksnr_nonagel      ? 1 : 0) |
                                           (route->ksnr_xchange_nids ? 2 : 0) |
                                           (route->ksnr_irq_affinity ? 4 : 0) |
                                           (route->ksnr_eager        ? 8 : 0);
@@ -1248,56 +1248,56 @@ ksocknal_cmd(struct portal_ioctl_data * data, void * private)
                 break;
         }
         case NAL_CMD_ADD_AUTOCONN: {
-                rc = ksocknal_add_route (data->ioc_nid, data->ioc_id,
-                                         data->ioc_misc, data->ioc_size,
-                                         (data->ioc_flags & 0x01) != 0,
-                                         (data->ioc_flags & 0x02) != 0,
-                                         (data->ioc_flags & 0x04) != 0,
-                                         (data->ioc_flags & 0x08) != 0,
-                                         (data->ioc_flags & 0x10) != 0);
+                rc = ksocknal_add_route (pcfg->pcfg_nid, pcfg->pcfg_id,
+                                         pcfg->pcfg_misc, pcfg->pcfg_size,
+                                         (pcfg->pcfg_flags & 0x01) != 0,
+                                         (pcfg->pcfg_flags & 0x02) != 0,
+                                         (pcfg->pcfg_flags & 0x04) != 0,
+                                         (pcfg->pcfg_flags & 0x08) != 0,
+                                         (pcfg->pcfg_flags & 0x10) != 0);
                 break;
         }
         case NAL_CMD_DEL_AUTOCONN: {
-                rc = ksocknal_del_route (data->ioc_nid, data->ioc_id, 
-                                         (data->ioc_flags & 1) != 0,
-                                         (data->ioc_flags & 2) != 0);
+                rc = ksocknal_del_route (pcfg->pcfg_nid, pcfg->pcfg_id, 
+                                         (pcfg->pcfg_flags & 1) != 0,
+                                         (pcfg->pcfg_flags & 2) != 0);
                 break;
         }
         case NAL_CMD_GET_CONN: {
-                ksock_conn_t *conn = ksocknal_get_conn_by_idx (data->ioc_count);
+                ksock_conn_t *conn = ksocknal_get_conn_by_idx (pcfg->pcfg_count);
 
                 if (conn == NULL)
                         rc = -ENOENT;
                 else {
                         rc = 0;
-                        data->ioc_nid  = conn->ksnc_peer->ksnp_nid;
-                        data->ioc_id   = conn->ksnc_ipaddr;
-                        data->ioc_misc = conn->ksnc_port;
+                        pcfg->pcfg_nid  = conn->ksnc_peer->ksnp_nid;
+                        pcfg->pcfg_id   = conn->ksnc_ipaddr;
+                        pcfg->pcfg_misc = conn->ksnc_port;
                         ksocknal_put_conn (conn);
                 }
                 break;
         }
         case NAL_CMD_REGISTER_PEER_FD: {
-                struct socket *sock = sockfd_lookup (data->ioc_fd, &rc);
+                struct socket *sock = sockfd_lookup (pcfg->pcfg_fd, &rc);
 
                 if (sock != NULL) {
-                        rc = ksocknal_create_conn (data->ioc_nid, NULL,
-                                                   sock, data->ioc_flags);
+                        rc = ksocknal_create_conn (pcfg->pcfg_nid, NULL,
+                                                   sock, pcfg->pcfg_flags);
                         if (rc != 0)
                                 fput (sock->file);
                 }
                 break;
         }
         case NAL_CMD_CLOSE_CONNECTION: {
-                rc = ksocknal_close_conn (data->ioc_nid, data->ioc_id);
+                rc = ksocknal_close_conn (pcfg->pcfg_nid, pcfg->pcfg_id);
                 break;
         }
         case NAL_CMD_REGISTER_MYNID: {
-                rc = ksocknal_set_mynid (data->ioc_nid);
+                rc = ksocknal_set_mynid (pcfg->pcfg_nid);
                 break;
         }
         case NAL_CMD_PUSH_CONNECTION: {
-                rc = ksocknal_push (data->ioc_nid);
+                rc = ksocknal_push (pcfg->pcfg_nid);
                 break;
         }
         }
index dc7e447..a85b281 100644 (file)
@@ -354,23 +354,23 @@ ktoenal_free_buffers (void)
 }
 
 int
-ktoenal_cmd(struct portal_ioctl_data * data, void * private)
+ktoenal_cmd(struct portals_cfg *pcfg, void * private)
 {
         int rc = -EINVAL;
 
-        LASSERT (data != NULL);
+        LASSERT (pcfg != NULL);
 
-        switch(data->ioc_nal_cmd) {
+        switch(pcfg->pcfg_command) {
         case NAL_CMD_REGISTER_PEER_FD: {
-                rc = ktoenal_add_sock(data->ioc_nid, data->ioc_fd);
+                rc = ktoenal_add_sock(pcfg->pcfg_nid, pcfg->pcfg_fd);
                 break;
         }
         case NAL_CMD_CLOSE_CONNECTION: {
-                rc = ktoenal_close_sock(data->ioc_nid);
+                rc = ktoenal_close_sock(pcfg->pcfg_nid);
                 break;
         }
         case NAL_CMD_REGISTER_MYNID: {
-                rc = ktoenal_set_mynid (data->ioc_nid);
+                rc = ktoenal_set_mynid (pcfg->pcfg_nid);
                 break;
         }
         }
index 308158b..6beae25 100644 (file)
@@ -207,17 +207,19 @@ kportal_get_route(int index, __u32 *gateway_nalidp, ptl_nid_t *gateway_nidp,
         return (rc);
 }
 
-static int
-kportal_nal_cmd(int nal, struct portal_ioctl_data *data)
+int
+kportal_nal_cmd(struct portals_cfg *pcfg)
 {
+        __u32 nal = pcfg->pcfg_nal;
         int rc = -EINVAL;
 
         ENTRY;
 
         down(&nal_cmd_sem);
         if (nal > 0 && nal <= NAL_MAX_NR && nal_cmd[nal].nch_handler) {
-                CDEBUG(D_IOCTL, "calling handler nal: %d, cmd: %d\n", nal, data->ioc_nal_cmd);
-                rc = nal_cmd[nal].nch_handler(data, nal_cmd[nal].nch_private);
+                CDEBUG(D_IOCTL, "calling handler nal: %d, cmd: %d\n", nal, 
+                       pcfg->pcfg_command);
+                rc = nal_cmd[nal].nch_handler(pcfg, nal_cmd[nal].nch_private);
         }
         up(&nal_cmd_sem);
         RETURN(rc);
@@ -445,15 +447,25 @@ static int kportal_ioctl(struct inode *inode, struct file *file,
                 break;
         }
 
-        case IOC_PORTAL_NAL_CMD:
-                CDEBUG (D_IOCTL, "nal command nal %d cmd %d\n", data->ioc_nal,
-                        data->ioc_nal_cmd);
-                err = kportal_nal_cmd(data->ioc_nal, data);
+        case IOC_PORTAL_NAL_CMD: {
+                struct portals_cfg pcfg;
+
+                LASSERT (data->ioc_plen1 == sizeof(pcfg));
+                err = copy_from_user(&pcfg, (void *)data->ioc_pbuf1, 
+                                     sizeof(pcfg));
+                if ( err ) {
+                        EXIT;
+                        return err;
+                }
+
+                CDEBUG (D_IOCTL, "nal command nal %d cmd %d\n", pcfg.pcfg_nal,
+                        pcfg.pcfg_command);
+                err = kportal_nal_cmd(&pcfg);
                 if (err == 0)
                         if (copy_to_user((char *)arg, data, sizeof (*data)))
                                 err = -EFAULT;
                 break;
-
+        }
         case IOC_PORTAL_FAIL_NID: {
                 const ptl_handle_ni_t *nip;
 
@@ -643,6 +655,7 @@ EXPORT_SYMBOL(kportal_assertion_failed);
 EXPORT_SYMBOL(dispatch_name);
 EXPORT_SYMBOL(kportal_get_ni);
 EXPORT_SYMBOL(kportal_put_ni);
+EXPORT_SYMBOL(kportal_nal_cmd);
 
 module_init(init_kportals_module);
 module_exit (exit_kportals_module);
index c6590db..9fb2759 100644 (file)
@@ -409,6 +409,7 @@ int main(int argc, char **argv)
                 int len = sizeof(clntaddr);
                 int cfd;
                 struct portal_ioctl_data data;
+                struct portals_cfg pcfg;
                 ptl_nid_t peer_nid;
                 
                 cfd = accept(fd, (struct sockaddr *)&clntaddr, &len);
@@ -441,13 +442,16 @@ int main(int argc, char **argv)
                 }
 
                 show_connection (cfd, clntaddr.sin_addr.s_addr, peer_nid);
-                
+
+                PCFG_INIT(pcfg, NAL_CMD_REGISTER_PEER_FD);
+                pcfg.pcfg_nal = nal;
+                pcfg.pcfg_fd = cfd;
+                pcfg.pcfg_nid = peer_nid;
+                pcfg.pcfg_flags = bind_irq;
+
                 PORTAL_IOC_INIT(data);
-                data.ioc_fd = cfd;
-                data.ioc_nal = nal;
-                data.ioc_nal_cmd = NAL_CMD_REGISTER_PEER_FD;
-                data.ioc_nid = peer_nid;
-                data.ioc_flags = bind_irq;
+                data.ioc_pbuf1 = (char*)&pcfg;
+                data.ioc_plen1 = sizeof(pcfg);
                 
                 if (ioctl(pfd, IOC_PORTAL_NAL_CMD, &data) < 0) {
                         perror("ioctl failed");
index 701a814..b401bb0 100644 (file)
@@ -50,6 +50,7 @@ int main(int argc, char **argv)
 {
         int rc, pfd;
         struct portal_ioctl_data data;
+        struct portals_cfg pcfg;
        unsigned int    nid = 0, len;
        char    *name = NULL;
        int     c;
@@ -76,21 +77,23 @@ int main(int argc, char **argv)
 
 
 
-        PORTAL_IOC_INIT (data);
+
+        PCFG_INIT(pcfg, GMNAL_IOC_GET_GNID);
+        pcfg.pcfg_nal = GMNAL;
 
        /*
         *      set up the inputs
         */
        len = strlen(name) + 1;
-       data.ioc_pbuf1 = malloc(len);
-       strcpy(data.ioc_pbuf1, name);
-       data.ioc_plen1 = len;
+       pcfg.pcfg_pbuf1 = malloc(len);
+       strcpy(pcfg.pcfg_pbuf1, name);
+       pcfg.pcfg_plen1 = len;
 
        /*
         *      set up the outputs
         */
-       data.ioc_pbuf2 = (void*)&nid;
-       data.ioc_plen2 = sizeof(unsigned int*);
+       pcfg.pcfg_pbuf2 = (void*)&nid;
+       pcfg.pcfg_plen2 = sizeof(unsigned int*);
 
         pfd = open("/dev/portals", O_RDWR);
         if ( pfd < 0 ) {
@@ -99,12 +102,10 @@ int main(int argc, char **argv)
                 exit(-1);
         }
 
-        data.ioc_nal = GMNAL;
-       data.ioc_nal_cmd = GMNAL_IOC_GET_GNID;
-/*
-       data.ioc_len += data.ioc_inllen1;
-       data.ioc_len += data.ioc_plen1;
-*/
+        PORTAL_IOC_INIT(data);
+        data.ioc_pbuf1 = (char*)&pcfg;
+        data.ioc_plen1 = sizeof(pcfg);
+                
         rc = ioctl (pfd, IOC_PORTAL_NAL_CMD, &data);
         if (rc < 0)
         {
index c608c28..8c4ebfe 100644 (file)
@@ -69,6 +69,38 @@ static name2num_t nalnames[] = {
         {NULL,         -1}
 };
 
+static cfg_record_cb_t g_record_cb;
+
+int 
+ptl_set_cfg_record_cb(cfg_record_cb_t cb)
+{
+        g_record_cb = cb;
+        return 0;
+}
+
+int 
+pcfg_ioctl(struct portals_cfg *pcfg) 
+{
+        int rc;
+
+        pcfg->pcfg_nal    = g_nal;
+
+        if (g_record_cb) {
+                rc = g_record_cb(PORTALS_CFG_TYPE, sizeof(*pcfg), pcfg);
+        } else {
+                struct portal_ioctl_data data;
+                PORTAL_IOC_INIT (data);
+                data.ioc_pbuf1   = (char*)pcfg;
+                data.ioc_plen1   = sizeof(*pcfg);
+
+                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        }
+
+        return (rc);
+}
+
+
+
 static name2num_t *
 name2num_lookup_name (name2num_t *table, char *str)
 {
@@ -387,7 +419,7 @@ int jt_ptl_network(int argc, char **argv)
 int 
 jt_ptl_print_autoconnects (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         char                     buffer[64];
         int                      index;
         int                      rc;
@@ -396,24 +428,22 @@ jt_ptl_print_autoconnects (int argc, char **argv)
                 return -1;
 
         for (index = 0;;index++) {
-                PORTAL_IOC_INIT (data);
-                data.ioc_nal     = g_nal;
-                data.ioc_nal_cmd = NAL_CMD_GET_AUTOCONN;
-                data.ioc_count   = index;
-                
-                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+                PCFG_INIT (pcfg, NAL_CMD_GET_AUTOCONN);
+                pcfg.pcfg_count   = index;
+
+                rc = pcfg_ioctl (&pcfg);
                 if (rc != 0)
                         break;
 
                 printf (LPX64"@%s:%d #%d buffer %d nonagle %s xchg %s "
                         "affinity %s eager %s share %d\n",
-                        data.ioc_nid, ptl_ipaddr_2_str (data.ioc_id, buffer),
-                        data.ioc_misc, data.ioc_count, data.ioc_size, 
-                        (data.ioc_flags & 1) ? "on" : "off",
-                        (data.ioc_flags & 2) ? "on" : "off",
-                        (data.ioc_flags & 4) ? "on" : "off",
-                        (data.ioc_flags & 8) ? "on" : "off",
-                        data.ioc_wait);
+                        pcfg.pcfg_nid, ptl_ipaddr_2_str (pcfg.pcfg_id, buffer),
+                        pcfg.pcfg_misc, pcfg.pcfg_count, pcfg.pcfg_size, 
+                        (pcfg.pcfg_flags & 1) ? "on" : "off",
+                        (pcfg.pcfg_flags & 2) ? "on" : "off",
+                        (pcfg.pcfg_flags & 4) ? "on" : "off",
+                        (pcfg.pcfg_flags & 8) ? "on" : "off",
+                        pcfg.pcfg_wait);
         }
 
         if (index == 0)
@@ -424,7 +454,7 @@ jt_ptl_print_autoconnects (int argc, char **argv)
 int 
 jt_ptl_add_autoconnect (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         ptl_nid_t                nid;
         __u32                    ip;
         int                      port;
@@ -482,21 +512,19 @@ jt_ptl_add_autoconnect (int argc, char **argv)
                         }
         }
 
-        PORTAL_IOC_INIT (data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_ADD_AUTOCONN;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ip;
-        data.ioc_misc    = port;
+        PCFG_INIT(pcfg, NAL_CMD_ADD_AUTOCONN);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ip;
+        pcfg.pcfg_misc    = port;
         /* only passing one buffer size! */
-        data.ioc_size    = MAX (g_socket_rxmem, g_socket_txmem);
-        data.ioc_flags   = (g_socket_nonagle ? 0x01 : 0) |
+        pcfg.pcfg_size    = MAX (g_socket_rxmem, g_socket_txmem);
+        pcfg.pcfg_flags   = (g_socket_nonagle ? 0x01 : 0) |
                            (xchange_nids     ? 0x02 : 0) |
                            (irq_affinity     ? 0x04 : 0) |
                            (share            ? 0x08 : 0) |
                            (eager            ? 0x10 : 0);
 
-        rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl (&pcfg);
         if (rc != 0) {
                 fprintf (stderr, "failed to enable autoconnect: %s\n",
                          strerror (errno));
@@ -509,7 +537,7 @@ jt_ptl_add_autoconnect (int argc, char **argv)
 int 
 jt_ptl_del_autoconnect (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg       pcfg;
         ptl_nid_t                nid = PTL_NID_ANY;
         __u32                    ip  = 0;
         int                      share = 0;
@@ -555,15 +583,13 @@ jt_ptl_del_autoconnect (int argc, char **argv)
                         }
         }
 
-        PORTAL_IOC_INIT (data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_DEL_AUTOCONN;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ip;
-        data.ioc_flags   = (share     ? 1 : 0) |
+        PCFG_INIT(pcfg, NAL_CMD_DEL_AUTOCONN);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ip;
+        pcfg.pcfg_flags   = (share     ? 1 : 0) |
                            (keep_conn ? 2 : 0);
-        
-        rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+
+        rc = pcfg_ioctl (&pcfg);
         if (rc != 0) {
                 fprintf (stderr, "failed to remove autoconnect route: %s\n",
                          strerror (errno));
@@ -576,7 +602,7 @@ jt_ptl_del_autoconnect (int argc, char **argv)
 int 
 jt_ptl_print_connections (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg       pcfg;
         char                     buffer[64];
         int                      index;
         int                      rc;
@@ -585,19 +611,17 @@ jt_ptl_print_connections (int argc, char **argv)
                 return -1;
 
         for (index = 0;;index++) {
-                PORTAL_IOC_INIT (data);
-                data.ioc_nal     = g_nal;
-                data.ioc_nal_cmd = NAL_CMD_GET_CONN;
-                data.ioc_count   = index;
+                PCFG_INIT (pcfg,  NAL_CMD_GET_CONN);
+                pcfg.pcfg_count   = index;
                 
-                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+                rc = pcfg_ioctl (&pcfg);
                 if (rc != 0)
                         break;
 
                 printf (LPX64"@%s:%d\n",
-                        data.ioc_nid, 
-                        ptl_ipaddr_2_str (data.ioc_id, buffer),
-                        data.ioc_misc);
+                        pcfg.pcfg_nid, 
+                        ptl_ipaddr_2_str (pcfg.pcfg_id, buffer),
+                        pcfg.pcfg_misc);
         }
 
         if (index == 0)
@@ -681,6 +705,7 @@ int jt_ptl_connect(int argc, char **argv)
 {
         ptl_nid_t peer_nid;
         struct portal_ioctl_data data;
+        struct portals_cfg pcfg;
         struct sockaddr_in srvaddr;
         __u32 ipaddr;
         char *flag;
@@ -805,14 +830,12 @@ int jt_ptl_connect(int argc, char **argv)
         printf("Connected host: %s NID "LPX64" snd: %d rcv: %d nagle: %s\n", argv[1],
                peer_nid, txmem, rxmem, nonagle ? "Disabled" : "Enabled");
 
-        PORTAL_IOC_INIT(data);
-        data.ioc_fd = fd;
-        data.ioc_nal = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_REGISTER_PEER_FD;
-        data.ioc_nid = peer_nid;
-        data.ioc_flags = bind_irq;
+        PCFG_INIT(pcfg, NAL_CMD_REGISTER_PEER_FD);
+        pcfg.pcfg_fd = fd;
+        pcfg.pcfg_nid = peer_nid;
+        pcfg.pcfg_flags = bind_irq;
 
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl(&pcfg);
         if (rc) {
                 fprintf(stderr, "failed to register fd with portals: %s\n", 
                         strerror(errno));
@@ -831,7 +854,7 @@ int jt_ptl_connect(int argc, char **argv)
 
 int jt_ptl_disconnect(int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         ptl_nid_t                nid = PTL_NID_ANY;
         __u32                    ipaddr = 0;
         int                      rc;
@@ -856,13 +879,11 @@ int jt_ptl_disconnect(int argc, char **argv)
                 return -1;
         }
 
-        PORTAL_IOC_INIT(data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_CLOSE_CONNECTION;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ipaddr;
+        PCFG_INIT(pcfg, NAL_CMD_CLOSE_CONNECTION);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ipaddr;
         
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl(&pcfg);
         if (rc) {
                 fprintf(stderr, "failed to remove connection: %s\n",
                         strerror(errno));
@@ -874,7 +895,7 @@ int jt_ptl_disconnect(int argc, char **argv)
 
 int jt_ptl_push_connection (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         int                      rc;
         ptl_nid_t                nid = PTL_NID_ANY;
         __u32                    ipaddr = 0;
@@ -898,13 +919,11 @@ int jt_ptl_push_connection (int argc, char **argv)
                 fprintf(stderr, "Can't parse ipaddr: %s\n", argv[2]);
         }
 
-        PORTAL_IOC_INIT(data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_PUSH_CONNECTION;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ipaddr;
-
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        PCFG_INIT(pcfg, NAL_CMD_PUSH_CONNECTION);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ipaddr;
+        
+        rc = pcfg_ioctl(&pcfg);
         if (rc) {
                 fprintf(stderr, "failed to push connection: %s\n",
                         strerror(errno));
@@ -917,7 +936,7 @@ int jt_ptl_push_connection (int argc, char **argv)
 int 
 jt_ptl_print_active_txs (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         int                      index;
         int                      rc;
 
@@ -925,28 +944,26 @@ jt_ptl_print_active_txs (int argc, char **argv)
                 return -1;
 
         for (index = 0;;index++) {
-                PORTAL_IOC_INIT (data);
-                data.ioc_nal     = g_nal;
-                data.ioc_nal_cmd = NAL_CMD_GET_TXDESC;
-                data.ioc_count   = index;
-                
-                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+                PCFG_INIT(pcfg, NAL_CMD_GET_TXDESC);
+                pcfg.pcfg_count   = index;
+        
+                rc = pcfg_ioctl(&pcfg);
                 if (rc != 0)
                         break;
 
                 printf ("%p: %5s payload %6d bytes to "LPX64" via "LPX64" by pid %6d: %s, %s, state %d\n",
-                        data.ioc_pbuf1,
-                        data.ioc_count == PTL_MSG_ACK ? "ACK" :
-                        data.ioc_count == PTL_MSG_PUT ? "PUT" :
-                        data.ioc_count == PTL_MSG_GET ? "GET" :
-                        data.ioc_count == PTL_MSG_REPLY ? "REPLY" : "<wierd message>",
-                        data.ioc_size,
-                        data.ioc_nid,
-                        data.ioc_nid2,
-                        data.ioc_misc,
-                        (data.ioc_flags & 1) ? "delayed" : "immediate",
-                        (data.ioc_flags & 2) ? "nblk"    : "normal",
-                        data.ioc_flags >> 2);
+                        pcfg.pcfg_pbuf1,
+                        pcfg.pcfg_count == PTL_MSG_ACK ? "ACK" :
+                        pcfg.pcfg_count == PTL_MSG_PUT ? "PUT" :
+                        pcfg.pcfg_count == PTL_MSG_GET ? "GET" :
+                        pcfg.pcfg_count == PTL_MSG_REPLY ? "REPLY" : "<wierd message>",
+                        pcfg.pcfg_size,
+                        pcfg.pcfg_nid,
+                        pcfg.pcfg_nid2,
+                        pcfg.pcfg_misc,
+                        (pcfg.pcfg_flags & 1) ? "delayed" : "immediate",
+                        (pcfg.pcfg_flags & 2) ? "nblk"    : "normal",
+                        pcfg.pcfg_flags >> 2);
         }
 
         if (index == 0)
@@ -1039,7 +1056,7 @@ int jt_ptl_mynid(int argc, char **argv)
         int rc;
         char hostname[1024];
         char *nidstr;
-        struct portal_ioctl_data data;
+        struct portals_cfg pcfg;
         ptl_nid_t mynid;
         
         if (argc > 2) {
@@ -1067,12 +1084,10 @@ int jt_ptl_mynid(int argc, char **argv)
                 return -1;
         }
         
-        PORTAL_IOC_INIT(data);
-        data.ioc_nid = mynid;
-        data.ioc_nal = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_REGISTER_MYNID;
+        PCFG_INIT(pcfg, NAL_CMD_REGISTER_MYNID);
+        pcfg.pcfg_nid = mynid;
 
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl(&pcfg);
         if (rc < 0)
                 fprintf(stderr, "setting my NID failed: %s\n",
                        strerror(errno));
index 1680e4d..26211e9 100644 (file)
@@ -71787,7 +71787,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_conf.h
 + *
 + *    dgap_conf.h - Header file for installations and parse files.
 + *
-+ *    $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
++ *    $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 + *
 + *    NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
 + */
@@ -72071,7 +72071,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_downld.h
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 + *
-+ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
++ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 + *
 + *    NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
 + *
@@ -72158,7 +72158,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_driver.c
 + *
 + */
 +
-+char *dgap_version = "$Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $";
++char *dgap_version = "$Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $";
 +
 +/*
 + * Our driver specific include files.
@@ -74796,7 +74796,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_mgmt.c
 + * FEP5 based product lines.
 + *
 + ************************************************************************
-+ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
++ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 + */
 +
 +#define __NO_VERSION__
@@ -75555,7 +75555,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_parse.c
 + *
 + * dgap_parse.c - Parses the configuration information from the input file.
 + *
-+ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
++ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 + *
 + */
 +
@@ -76886,7 +76886,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_pci.h
 + *    NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
 + */
 +
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
 +
 +#ifndef __DGAP_PCI_H
 +#define __DGAP_PCI_H
@@ -77726,7 +77726,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_trace.c
 + *
 + */
 +
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
 +
 +#define __NO_VERSION__
 +#include "dgap_driver.h"
@@ -77905,7 +77905,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_trace.h
 + *****************************************************************************
 + * Header file for dgap_trace.c
 + *
-+ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
++ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 + */
 +
 +#ifndef __DGAP_TRACE_H
@@ -77960,7 +77960,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/dgap_tty.c
 + *
 + ************************************************************************
 + *
-+ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
++ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 + */
 +
 +#include "dgap_driver.h"
@@ -81974,7 +81974,7 @@ Index: linux-2.6.0-test5/drivers/char/digi/dgap/digi.h
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 + *
-+ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
++ * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 + *
 + *    NOTE: THIS IS A SHARED HEADER. DO NOT CHANGE CODING STYLE!!!
 + */
@@ -82456,7 +82456,7 @@ Index: linux-2.6.0-test5/drivers/char/ftape/lowlevel/ftape-init.c
 --- linux-2.6.0-test5.orig/drivers/char/ftape/lowlevel/ftape-init.c    2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/char/ftape/lowlevel/ftape-init.c 2003-09-27 11:38:21.028331592 +0800
 @@ -55,14 +55,24 @@
- char ft_dat[] __initdata = "$Date: 2003/09/30 14:47:19 $";
+ char ft_dat[] __initdata = "$Date: 2003/10/08 07:06:24 $";
  
  
 +#ifndef CONFIG_FT_NO_TRACE_AT_ALL
@@ -83642,7 +83642,7 @@ Index: linux-2.6.0-test5/drivers/cpufreq/cpufreq.c
   *  Copyright (C) 2001 Russell King
   *            (C) 2002 - 2003 Dominik Brodowski <linux@brodo.de>
   *
-- *  $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+- *  $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 - *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
@@ -83773,7 +83773,7 @@ Index: linux-2.6.0-test5/drivers/cpufreq/cpufreq_userspace.c
   *  Copyright (C)  2001 Russell King
   *            (C)  2002 - 2003 Dominik Brodowski <linux@brodo.de>
   *
-- * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+- * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 - *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
@@ -87529,8 +87529,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/capifunc.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/capifunc.c      2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/capifunc.c   2003-09-27 11:38:21.506258936 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * ISDN interface module for Eicon active cards DIVA.
   * CAPI Interface common functions
@@ -87945,8 +87945,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/capifunc.h
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/capifunc.h      2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/capifunc.h   2003-09-27 11:38:21.507258784 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * ISDN interface module for Eicon active cards DIVA.
   * CAPI Interface common functions
@@ -87972,8 +87972,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/capimain.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/capimain.c      2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/capimain.c   2003-09-27 11:38:21.509258480 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * ISDN interface module for Eicon active cards DIVA.
   * CAPI Interface
@@ -88000,8 +88000,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/capimain.c
  #include "cp_vers.h"
  #include "capifunc.h"
  
--static char *main_revision = "$Revision: 1.1.2.1 $";
-+static char *main_revision = "$Revision: 1.1.2.1 $";
+-static char *main_revision = "$Revision: 1.1.2.2 $";
++static char *main_revision = "$Revision: 1.1.2.2 $";
  static char *DRIVERNAME =
      "Eicon DIVA - CAPI Interface driver (http://www.melware.net)";
  static char *DRIVERLNAME = "divacapi";
@@ -88399,8 +88399,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/diddfunc.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/diddfunc.c      2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/diddfunc.c   2003-09-27 11:38:21.547252704 +0800
 @@ -1,11 +1,11 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * DIDD Interface module for Eicon active cards.
   * 
@@ -88453,8 +88453,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/diva.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/diva.c  2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/diva.c       2003-09-27 11:38:21.553251792 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #define CARDTYPE_H_WANT_DATA            1
  #define CARDTYPE_H_WANT_IDI_DATA        0
@@ -88583,8 +88583,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/diva_didd.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/diva_didd.c     2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/diva_didd.c  2003-09-27 11:38:21.569249360 +0800
 @@ -1,11 +1,11 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * DIDD Interface module for Eicon active cards.
   * 
@@ -88601,8 +88601,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/diva_didd.c
  #include "divasync.h"
  #include "did_vers.h"
  
--static char *main_revision = "$Revision: 1.1.2.1 $";
-+static char *main_revision = "$Revision: 1.1.2.1 $";
+-static char *main_revision = "$Revision: 1.1.2.2 $";
++static char *main_revision = "$Revision: 1.1.2.2 $";
  
  static char *DRIVERNAME =
      "Eicon DIVA - DIDD table (http://www.melware.net)";
@@ -88711,8 +88711,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divamnt.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/divamnt.c       2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/divamnt.c    2003-09-27 11:38:21.573248752 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * Driver for Eicon DIVA Server ISDN cards.
   * Maint module
@@ -88736,8 +88736,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divamnt.c
  #include "di_defs.h"
  #include "debug_if.h"
  
--static char *main_revision = "$Revision: 1.1.2.1 $";
-+static char *main_revision = "$Revision: 1.1.2.1 $";
+-static char *main_revision = "$Revision: 1.1.2.2 $";
++static char *main_revision = "$Revision: 1.1.2.2 $";
  
 -static int major = 241;
 +static int major;
@@ -88882,8 +88882,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/diva_pci.h
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/diva_pci.h      2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/diva_pci.h   2003-09-27 11:38:21.575248448 +0800
 @@ -1,9 +1,12 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #ifndef __DIVA_PCI_INTERFACE_H__
  #define __DIVA_PCI_INTERFACE_H__
@@ -88901,8 +88901,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasfunc.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/divasfunc.c     2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasfunc.c  2003-09-27 11:38:21.577248144 +0800
 @@ -1,9 +1,9 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * Low level driver for Eicon DIVA Server ISDN cards.
   *
@@ -88989,8 +88989,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasi.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/divasi.c        2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasi.c     2003-09-27 11:38:21.582247384 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * Driver for Eicon DIVA Server ISDN cards.
   * User Mode IDI Interface 
@@ -89014,8 +89014,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasi.c
  #include "um_xdi.h"
  #include "um_idi.h"
  
--static char *main_revision = "$Revision: 1.1.2.1 $";
-+static char *main_revision = "$Revision: 1.1.2.1 $";
+-static char *main_revision = "$Revision: 1.1.2.2 $";
++static char *main_revision = "$Revision: 1.1.2.2 $";
  
 -static int major = 242;
 +static int major;
@@ -89192,8 +89192,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasmain.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/divasmain.c     2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasmain.c  2003-09-27 11:38:21.589246320 +0800
 @@ -1,9 +1,9 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * Low level driver for Eicon DIVA Server ISDN cards.
   *
@@ -89232,8 +89232,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasmain.c
  #include "diva_dma.h"
 +#include "diva_pci.h"
  
--static char *main_revision = "$Revision: 1.1.2.1 $";
-+static char *main_revision = "$Revision: 1.1.2.1 $";
+-static char *main_revision = "$Revision: 1.1.2.2 $";
++static char *main_revision = "$Revision: 1.1.2.2 $";
  
 -int errno = 0;
 -static int major = 240;
@@ -89443,8 +89443,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasproc.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/divasproc.c     2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/divasproc.c  2003-09-27 11:38:21.592245864 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * Low level driver for Eicon DIVA Server ISDN cards.
   * /proc functions
@@ -89555,8 +89555,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/dlist.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/dlist.c 2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/dlist.c      2003-09-27 11:38:21.594245560 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #include "platform.h"
  #include "dlist.h"
@@ -89639,8 +89639,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/dlist.h
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/dlist.h 2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/dlist.h      2003-09-27 11:38:21.595245408 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #ifndef __DIVA_LINK_H__
  #define __DIVA_LINK_H__
@@ -89679,8 +89679,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/idifunc.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/idifunc.c       2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/idifunc.c    2003-09-27 11:38:21.607243584 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * Driver for Eicon DIVA Server ISDN cards.
   * User Mode IDI Interface 
@@ -90218,8 +90218,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/mntfunc.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/mntfunc.c       2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/mntfunc.c    2003-09-27 11:38:21.741223216 +0800
 @@ -1,10 +1,10 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * Driver for Eicon DIVA Server ISDN cards.
   * Maint module
@@ -90272,8 +90272,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/os_4bri.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/os_4bri.c       2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/os_4bri.c    2003-09-27 11:38:21.749222000 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #include "platform.h"
  #include "debuglib.h"
@@ -90626,8 +90626,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/os_bri.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/os_bri.c        2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/os_bri.c     2003-09-27 11:38:21.755221088 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #include "platform.h"
  #include "debuglib.h"
@@ -90926,8 +90926,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/os_pri.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/os_pri.c        2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/os_pri.c     2003-09-27 11:38:21.763219872 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #include "platform.h"
  #include "debuglib.h"
@@ -91287,8 +91287,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/platform.h
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/platform.h      2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/platform.h   2003-09-27 11:38:21.770218808 +0800
 @@ -1,9 +1,9 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   *
   * platform.h
   * 
@@ -92443,8 +92443,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/um_idi.c
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/um_idi.c        2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/um_idi.c     2003-09-27 11:38:21.799214400 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #include "platform.h"
  #include "di_defs.h"
@@ -92482,8 +92482,8 @@ Index: linux-2.6.0-test5/drivers/isdn/hardware/eicon/xdi_adapter.h
 --- linux-2.6.0-test5.orig/drivers/isdn/hardware/eicon/xdi_adapter.h   2003-09-26 14:32:02.000000000 +0800
 +++ linux-2.6.0-test5/drivers/isdn/hardware/eicon/xdi_adapter.h        2003-09-27 11:38:21.800214248 +0800
 @@ -1,4 +1,4 @@
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
-+/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $ */
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
++/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $ */
  
  #ifndef __DIVA_OS_XDI_ADAPTER_H__
  #define __DIVA_OS_XDI_ADAPTER_H__
@@ -176902,7 +176902,7 @@ Index: linux-2.6.0-test5/include/asm-ia64/sn/router.h
 +++ linux-2.6.0-test5/include/asm-ia64/sn/router.h     2003-09-27 11:38:40.316399360 +0800
 @@ -1,5 +1,4 @@
 -
--/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+-/* $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
 +/* $id$
   *
   * This file is subject to the terms and conditions of the GNU General Public
@@ -220862,7 +220862,7 @@ Index: linux-2.6.0-test5/net/bluetooth/af_bluetooth.c
 +++ linux-2.6.0-test5/net/bluetooth/af_bluetooth.c     2003-09-27 11:38:41.562209968 +0800
 @@ -27,7 +27,7 @@
   *
-  * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.1 2003/09/30 14:47:19 wangdi Exp $
+  * $Id: 2.6.0-test5-mm4.patch,v 1.1.2.2 2003/10/08 07:06:24 rread Exp $
   */
 -#define VERSION "2.2"
 +#define VERSION "2.3"
index 1586aa9..d30e806 100644 (file)
@@ -137,7 +137,8 @@ extern struct super_operations ll_super_operations;
 
 char *ll_read_opt(const char *opt, char *data);
 int ll_set_opt(const char *opt, char *data, int fl);
-void ll_options(char *options, char **ost, char **mds, int *flags);
+void ll_options(char *options, char **ost, char **mds, char **zconf, 
+                char **mds_uuid, int *flags);
 void ll_lli_init(struct ll_inode_info *lli);
 int ll_fill_super(struct super_block *sb, void *data, int silent);
 void ll_put_super(struct super_block *sb);
index 148b883..0c634eb 100644 (file)
@@ -269,3 +269,4 @@ void mdc_getattr_pack(struct ptlrpc_request *req, int valid, int offset,
                 LOGL0(data->name, data->namelen, tmp);
         }
 }
+
index dc554d7..258352d 100644 (file)
@@ -51,6 +51,9 @@ int mds_lov_write_objids(struct obd_device *obd);
 void mds_lov_update_objids(struct obd_device *obd, obd_id *ids);
 int mds_lov_set_growth(struct mds_obd *mds, int count);
 int mds_lov_set_nextid(struct obd_device *obd);
+int mds_set_lovdesc(struct obd_device *obd, struct lov_desc *desc,
+                    struct obd_uuid *uuidarray);
+int mds_post_mds_lovconf(struct obd_device *obd);
 
 /* mds/mds_open.c */
 int mds_query_write_access(struct inode *inode);
@@ -73,7 +76,6 @@ int mds_obd_create(struct obd_export *exp, struct obdo *oa,
 extern struct lvfs_callback_ops mds_lvfs_ops;
 extern int mds_iocontrol(unsigned int cmd, struct obd_export *exp,
                          int len, void *karg, void *uarg);
-
 #ifdef __KERNEL__
 void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode);
 void mds_pack_inode2body(struct mds_body *body, struct inode *inode);
index 30ce9d7..f6d8d06 100644 (file)
 /* sanobd setup methods - use a specific mount option */
 int filter_san_setup(struct obd_device *obd, obd_count len, void *buf)
 {
-        struct obd_ioctl_data* data = buf;
+        struct lustre_cfg* lcfg = buf;
         char *option = NULL;
 
-        if (!data->ioc_inlbuf2)
+        if (!lcfg->lcfg_inlbuf2)
                 RETURN(-EINVAL);
 
         /* for extN/ext3 filesystem, we must mount it with 'writeback' mode */
-        if (!strcmp(data->ioc_inlbuf2, "extN"))
+        if (!strcmp(lcfg->lcfg_inlbuf2, "extN"))
                 option = "data=writeback";
-        else if (!strcmp(data->ioc_inlbuf2, "ext3"))
+        else if (!strcmp(lcfg->lcfg_inlbuf2, "ext3"))
                 option = "data=writeback,asyncdel";
         else
                 LBUG(); /* just a reminder */
index 1a50314..79b4b6b 100644 (file)
@@ -54,20 +54,20 @@ static kdev_t path2dev(char *path)
 
 int client_sanobd_setup(struct obd_device *obddev, obd_count len, void *buf)
 {
-        struct obd_ioctl_data* data = buf;
+        struct lustre_cfg* lcfg = buf;
         struct client_obd *cli = &obddev->u.cli;
         ENTRY;
 
-        if (data->ioc_inllen3 < 1) {
+        if (lcfg->lcfg_inllen3 < 1) {
                 CERROR("setup requires a SAN device pathname\n");
                 RETURN(-EINVAL);
         }
 
         client_obd_setup(obddev, len, buf);
 
-        cli->cl_sandev = path2dev(data->ioc_inlbuf3);
+        cli->cl_sandev = path2dev(lcfg->lcfg_inlbuf3);
         if (!kdev_t_to_nr(cli->cl_sandev)) {
-                CERROR("%s seems not a valid SAN device\n", data->ioc_inlbuf3);
+                CERROR("%s seems not a valid SAN device\n", lcfg->lcfg_inlbuf3);
                 RETURN(-EINVAL);
         }
 
index 6f31b9f..94b61e0 100644 (file)
@@ -755,6 +755,39 @@ do {                                                                    \
  * USER LEVEL STUFF BELOW
  */
 
+#define PORTALS_CFG_VERSION 0x00010001;
+
+struct portals_cfg {
+        __u32 pcfg_version;
+        __u32 pcfg_command;
+
+        __u32 pcfg_nal;
+        __u32 pcfg_flags;
+
+        __u64 pcfg_nid;
+        __u64 pcfg_nid2;
+        __u64 pcfg_nid3;
+        __u32 pcfg_id;
+        __u32 pcfg_misc;
+        __u32 pcfg_fd;
+        __u32 pcfg_count;
+        __u32 pcfg_size;
+        __u32 pcfg_wait;
+
+        __u32 pcfg_plen1; /* buffers in userspace */
+        char *pcfg_pbuf1;
+        __u32 pcfg_plen2; /* buffers in userspace */
+        char *pcfg_pbuf2;
+};
+
+#define PCFG_INIT(pcfg, cmd)                            \
+do {                                                    \
+        memset(&pcfg, 0, sizeof(pcfg));                 \
+        pcfg.pcfg_version = PORTALS_CFG_VERSION;        \
+        pcfg.pcfg_command = (cmd);                      \
+                                                        \
+} while (0)
+
 #define PORTAL_IOCTL_VERSION 0x00010007
 #define PING_SYNC       0
 #define PING_ASYNC      1
@@ -1032,11 +1065,20 @@ struct lustre_peer {
         ptl_handle_ni_t peer_ni;
 };
 
+
 /* module.c */
-typedef int (*nal_cmd_handler_t)(struct portal_ioctl_data *, void * private);
+typedef int (*nal_cmd_handler_t)(struct portals_cfg *, void * private);
 int kportal_nal_register(int nal, nal_cmd_handler_t handler, void * private);
 int kportal_nal_unregister(int nal);
 
+enum cfg_record_type {
+        PORTALS_CFG_TYPE = 1,
+        LUSTRE_CFG_TYPE = 123,
+};
+
+typedef int (*cfg_record_cb_t)(enum cfg_record_type, int len, void *data);
+int kportal_nal_cmd(struct portals_cfg *);
+
 ptl_handle_ni_t *kportal_get_ni (int nal);
 void kportal_put_ni (int nal);
 
index a528a80..14d60c6 100644 (file)
@@ -42,6 +42,11 @@ static inline int size_round (int val)
         return (val + 7) & (~0x7);
 }
 
+static inline int size_round16(int val)
+{
+        return (val + 0xf) & (~0xf);
+}
+
 static inline int size_round0(int val)
 {
         if (!val)
index d389aab..5f266e2 100644 (file)
@@ -18,8 +18,8 @@
 #include <unistd.h>
 #include <sys/time.h>
 #include <portals/types.h>
-#include <portals/ptlctl.h>
 #include <linux/kp30.h>
+#include <portals/ptlctl.h>
 #include <linux/limits.h>
 #include <asm/page.h>
 #include <linux/version.h>
index 7763f1b..0466494 100644 (file)
@@ -71,6 +71,8 @@ int jt_dbg_mark_debug_buf(int argc, char **argv);
 int jt_dbg_modules(int argc, char **argv);
 int jt_dbg_panic(int argc, char **argv);
 
+int ptl_set_cfg_record_cb(cfg_record_cb_t cb);
+
 /* l_ioctl.c */
 int register_ioc_dev(int dev_id, const char * dev_name);
 void unregister_ioc_dev(int dev_id);
index 8e0f64c..ae401a8 100644 (file)
@@ -35,7 +35,7 @@ ptl_handle_ni_t       kgmnal_ni;
 
 
 int 
-gmnal_cmd(struct portal_ioctl_data *data, void *private)
+gmnal_cmd(struct portals_cfg *pcfg, void *private)
 {
        gmnal_data_t    *nal_data = NULL;
        char            *name = NULL;
@@ -45,16 +45,16 @@ gmnal_cmd(struct portal_ioctl_data *data, void *private)
 
 
        CDEBUG(D_TRACE, "gmnal_cmd [%d] private [%p]\n", 
-              data->ioc_nal_cmd, private);
+              pcfg->pcfg_command, private);
        nal_data = (gmnal_data_t*)private;
-       switch(data->ioc_nal_cmd) {
+       switch(pcfg->pcfg_command) {
        /*
         * just reuse already defined GET_NID. Should define GMNAL version
         */
        case(GMNAL_IOC_GET_GNID):
 
-               PORTAL_ALLOC(name, data->ioc_plen1);
-               copy_from_user(name, data->ioc_pbuf1, data->ioc_plen1);
+               PORTAL_ALLOC(name, pcfg->pcfg_plen1);
+               copy_from_user(name, pcfg->pcfg_pbuf1, pcfg->pcfg_plen1);
        
                GMNAL_GM_LOCK(nal_data);
                nid = gm_host_name_to_node_id(nal_data->gm_port, name);
@@ -70,11 +70,11 @@ gmnal_cmd(struct portal_ioctl_data *data, void *private)
                        return(-1);
                }
                CDEBUG(D_INFO, "Global node is is [%u][%x]\n", gnid, gnid);
-               copy_to_user(data->ioc_pbuf2, &gnid, data->ioc_plen2);
+               copy_to_user(pcfg->pcfg_pbuf2, &gnid, pcfg->pcfg_plen2);
        break;
        default:
-               CDEBUG(D_INFO, "gmnal_cmd UNKNOWN[%d]\n", data->ioc_nal_cmd);
-               data->ioc_nid2 = -1;
+               CDEBUG(D_INFO, "gmnal_cmd UNKNOWN[%d]\n", pcfg->pcfg_nal_cmd);
+               pcfg->pcfg_nid2 = -1;
        }
 
 
index cdafba9..4472e30 100644 (file)
@@ -113,12 +113,12 @@ kqswnal_init(int interface, ptl_pt_index_t ptl_size, ptl_ac_index_t ac_size,
 }
 
 int
-kqswnal_get_tx_desc (struct portal_ioctl_data *data)
+kqswnal_get_tx_desc (struct portals_cfg *pcfg)
 {
        unsigned long      flags;
        struct list_head  *tmp;
        kqswnal_tx_t      *ktx;
-       int                index = data->ioc_count;
+       int                index = pcfg->pcfg_count;
        int                rc = -ENOENT;
 
        spin_lock_irqsave (&kqswnal_data.kqn_idletxd_lock, flags);
@@ -129,13 +129,13 @@ kqswnal_get_tx_desc (struct portal_ioctl_data *data)
 
                ktx = list_entry (tmp, kqswnal_tx_t, ktx_list);
 
-               data->ioc_pbuf1 = (char *)ktx;
-               data->ioc_count = NTOH__u32(ktx->ktx_wire_hdr->type);
-               data->ioc_size  = NTOH__u32(PTL_HDR_LENGTH(ktx->ktx_wire_hdr));
-               data->ioc_nid   = NTOH__u64(ktx->ktx_wire_hdr->dest_nid);
-               data->ioc_nid2  = ktx->ktx_nid;
-               data->ioc_misc  = ktx->ktx_launcher;
-               data->ioc_flags = (list_empty (&ktx->ktx_delayed_list) ? 0 : 1) |
+               pcfg->pcfg_pbuf1 = (char *)ktx;
+               pcfg->pcfg_count = NTOH__u32(ktx->ktx_wire_hdr->type);
+               pcfg->pcfg_size  = NTOH__u32(PTL_HDR_LENGTH(ktx->ktx_wire_hdr));
+               pcfg->pcfg_nid   = NTOH__u64(ktx->ktx_wire_hdr->dest_nid);
+               pcfg->pcfg_nid2  = ktx->ktx_nid;
+               pcfg->pcfg_misc  = ktx->ktx_launcher;
+               pcfg->pcfg_flags = (list_empty (&ktx->ktx_delayed_list) ? 0 : 1) |
                                  (!ktx->ktx_isnblk                    ? 0 : 2) |
                                  (ktx->ktx_state << 2);
                rc = 0;
@@ -147,21 +147,21 @@ kqswnal_get_tx_desc (struct portal_ioctl_data *data)
 }
 
 int
-kqswnal_cmd (struct portal_ioctl_data *data, void *private)
+kqswnal_cmd (struct portals_cfg *pcfg, void *private)
 {
-       LASSERT (data != NULL);
+       LASSERT (pcfg != NULL);
        
-       switch (data->ioc_nal_cmd) {
+       switch (pcfg->pcfg_command) {
        case NAL_CMD_GET_TXDESC:
-               return (kqswnal_get_tx_desc (data));
+               return (kqswnal_get_tx_desc (pcfg));
 
        case NAL_CMD_REGISTER_MYNID:
                CDEBUG (D_IOCTL, "setting NID offset to "LPX64" (was "LPX64")\n",
-                       data->ioc_nid - kqswnal_data.kqn_elanid,
+                       pcfg->pcfg_nid - kqswnal_data.kqn_elanid,
                        kqswnal_data.kqn_nid_offset);
                kqswnal_data.kqn_nid_offset =
-                       data->ioc_nid - kqswnal_data.kqn_elanid;
-               kqswnal_lib.ni.nid = data->ioc_nid;
+                       pcfg->pcfg_nid - kqswnal_data.kqn_elanid;
+               kqswnal_lib.ni.nid = pcfg->pcfg_nid;
                return (0);
                
        default:
index 33f950e..c72717d 100644 (file)
@@ -1219,27 +1219,27 @@ ksocknal_push (ptl_nid_t nid)
 }
 
 int
-ksocknal_cmd(struct portal_ioctl_data * data, void * private)
+ksocknal_cmd(struct portals_cfg *pcfg, void * private)
 {
         int rc = -EINVAL;
 
-        LASSERT (data != NULL);
+        LASSERT (pcfg != NULL);
 
-        switch(data->ioc_nal_cmd) {
+        switch(pcfg->pcfg_command) {
         case NAL_CMD_GET_AUTOCONN: {
-                ksock_route_t *route = ksocknal_get_route_by_idx (data->ioc_count);
+                ksock_route_t *route = ksocknal_get_route_by_idx (pcfg->pcfg_count);
 
                 if (route == NULL)
                         rc = -ENOENT;
                 else {
                         rc = 0;
-                        data->ioc_nid   = route->ksnr_peer->ksnp_nid;
-                        data->ioc_id    = route->ksnr_ipaddr;
-                        data->ioc_misc  = route->ksnr_port;
-                        data->ioc_count = route->ksnr_generation;
-                        data->ioc_size  = route->ksnr_buffer_size;
-                        data->ioc_wait  = route->ksnr_sharecount;
-                        data->ioc_flags = (route->ksnr_nonagel      ? 1 : 0) |
+                        pcfg->pcfg_nid   = route->ksnr_peer->ksnp_nid;
+                        pcfg->pcfg_id    = route->ksnr_ipaddr;
+                        pcfg->pcfg_misc  = route->ksnr_port;
+                        pcfg->pcfg_count = route->ksnr_generation;
+                        pcfg->pcfg_size  = route->ksnr_buffer_size;
+                        pcfg->pcfg_wait  = route->ksnr_sharecount;
+                        pcfg->pcfg_flags = (route->ksnr_nonagel      ? 1 : 0) |
                                           (route->ksnr_xchange_nids ? 2 : 0) |
                                           (route->ksnr_irq_affinity ? 4 : 0) |
                                           (route->ksnr_eager        ? 8 : 0);
@@ -1248,56 +1248,56 @@ ksocknal_cmd(struct portal_ioctl_data * data, void * private)
                 break;
         }
         case NAL_CMD_ADD_AUTOCONN: {
-                rc = ksocknal_add_route (data->ioc_nid, data->ioc_id,
-                                         data->ioc_misc, data->ioc_size,
-                                         (data->ioc_flags & 0x01) != 0,
-                                         (data->ioc_flags & 0x02) != 0,
-                                         (data->ioc_flags & 0x04) != 0,
-                                         (data->ioc_flags & 0x08) != 0,
-                                         (data->ioc_flags & 0x10) != 0);
+                rc = ksocknal_add_route (pcfg->pcfg_nid, pcfg->pcfg_id,
+                                         pcfg->pcfg_misc, pcfg->pcfg_size,
+                                         (pcfg->pcfg_flags & 0x01) != 0,
+                                         (pcfg->pcfg_flags & 0x02) != 0,
+                                         (pcfg->pcfg_flags & 0x04) != 0,
+                                         (pcfg->pcfg_flags & 0x08) != 0,
+                                         (pcfg->pcfg_flags & 0x10) != 0);
                 break;
         }
         case NAL_CMD_DEL_AUTOCONN: {
-                rc = ksocknal_del_route (data->ioc_nid, data->ioc_id, 
-                                         (data->ioc_flags & 1) != 0,
-                                         (data->ioc_flags & 2) != 0);
+                rc = ksocknal_del_route (pcfg->pcfg_nid, pcfg->pcfg_id, 
+                                         (pcfg->pcfg_flags & 1) != 0,
+                                         (pcfg->pcfg_flags & 2) != 0);
                 break;
         }
         case NAL_CMD_GET_CONN: {
-                ksock_conn_t *conn = ksocknal_get_conn_by_idx (data->ioc_count);
+                ksock_conn_t *conn = ksocknal_get_conn_by_idx (pcfg->pcfg_count);
 
                 if (conn == NULL)
                         rc = -ENOENT;
                 else {
                         rc = 0;
-                        data->ioc_nid  = conn->ksnc_peer->ksnp_nid;
-                        data->ioc_id   = conn->ksnc_ipaddr;
-                        data->ioc_misc = conn->ksnc_port;
+                        pcfg->pcfg_nid  = conn->ksnc_peer->ksnp_nid;
+                        pcfg->pcfg_id   = conn->ksnc_ipaddr;
+                        pcfg->pcfg_misc = conn->ksnc_port;
                         ksocknal_put_conn (conn);
                 }
                 break;
         }
         case NAL_CMD_REGISTER_PEER_FD: {
-                struct socket *sock = sockfd_lookup (data->ioc_fd, &rc);
+                struct socket *sock = sockfd_lookup (pcfg->pcfg_fd, &rc);
 
                 if (sock != NULL) {
-                        rc = ksocknal_create_conn (data->ioc_nid, NULL,
-                                                   sock, data->ioc_flags);
+                        rc = ksocknal_create_conn (pcfg->pcfg_nid, NULL,
+                                                   sock, pcfg->pcfg_flags);
                         if (rc != 0)
                                 fput (sock->file);
                 }
                 break;
         }
         case NAL_CMD_CLOSE_CONNECTION: {
-                rc = ksocknal_close_conn (data->ioc_nid, data->ioc_id);
+                rc = ksocknal_close_conn (pcfg->pcfg_nid, pcfg->pcfg_id);
                 break;
         }
         case NAL_CMD_REGISTER_MYNID: {
-                rc = ksocknal_set_mynid (data->ioc_nid);
+                rc = ksocknal_set_mynid (pcfg->pcfg_nid);
                 break;
         }
         case NAL_CMD_PUSH_CONNECTION: {
-                rc = ksocknal_push (data->ioc_nid);
+                rc = ksocknal_push (pcfg->pcfg_nid);
                 break;
         }
         }
index dc7e447..a85b281 100644 (file)
@@ -354,23 +354,23 @@ ktoenal_free_buffers (void)
 }
 
 int
-ktoenal_cmd(struct portal_ioctl_data * data, void * private)
+ktoenal_cmd(struct portals_cfg *pcfg, void * private)
 {
         int rc = -EINVAL;
 
-        LASSERT (data != NULL);
+        LASSERT (pcfg != NULL);
 
-        switch(data->ioc_nal_cmd) {
+        switch(pcfg->pcfg_command) {
         case NAL_CMD_REGISTER_PEER_FD: {
-                rc = ktoenal_add_sock(data->ioc_nid, data->ioc_fd);
+                rc = ktoenal_add_sock(pcfg->pcfg_nid, pcfg->pcfg_fd);
                 break;
         }
         case NAL_CMD_CLOSE_CONNECTION: {
-                rc = ktoenal_close_sock(data->ioc_nid);
+                rc = ktoenal_close_sock(pcfg->pcfg_nid);
                 break;
         }
         case NAL_CMD_REGISTER_MYNID: {
-                rc = ktoenal_set_mynid (data->ioc_nid);
+                rc = ktoenal_set_mynid (pcfg->pcfg_nid);
                 break;
         }
         }
index 308158b..6beae25 100644 (file)
@@ -207,17 +207,19 @@ kportal_get_route(int index, __u32 *gateway_nalidp, ptl_nid_t *gateway_nidp,
         return (rc);
 }
 
-static int
-kportal_nal_cmd(int nal, struct portal_ioctl_data *data)
+int
+kportal_nal_cmd(struct portals_cfg *pcfg)
 {
+        __u32 nal = pcfg->pcfg_nal;
         int rc = -EINVAL;
 
         ENTRY;
 
         down(&nal_cmd_sem);
         if (nal > 0 && nal <= NAL_MAX_NR && nal_cmd[nal].nch_handler) {
-                CDEBUG(D_IOCTL, "calling handler nal: %d, cmd: %d\n", nal, data->ioc_nal_cmd);
-                rc = nal_cmd[nal].nch_handler(data, nal_cmd[nal].nch_private);
+                CDEBUG(D_IOCTL, "calling handler nal: %d, cmd: %d\n", nal, 
+                       pcfg->pcfg_command);
+                rc = nal_cmd[nal].nch_handler(pcfg, nal_cmd[nal].nch_private);
         }
         up(&nal_cmd_sem);
         RETURN(rc);
@@ -445,15 +447,25 @@ static int kportal_ioctl(struct inode *inode, struct file *file,
                 break;
         }
 
-        case IOC_PORTAL_NAL_CMD:
-                CDEBUG (D_IOCTL, "nal command nal %d cmd %d\n", data->ioc_nal,
-                        data->ioc_nal_cmd);
-                err = kportal_nal_cmd(data->ioc_nal, data);
+        case IOC_PORTAL_NAL_CMD: {
+                struct portals_cfg pcfg;
+
+                LASSERT (data->ioc_plen1 == sizeof(pcfg));
+                err = copy_from_user(&pcfg, (void *)data->ioc_pbuf1, 
+                                     sizeof(pcfg));
+                if ( err ) {
+                        EXIT;
+                        return err;
+                }
+
+                CDEBUG (D_IOCTL, "nal command nal %d cmd %d\n", pcfg.pcfg_nal,
+                        pcfg.pcfg_command);
+                err = kportal_nal_cmd(&pcfg);
                 if (err == 0)
                         if (copy_to_user((char *)arg, data, sizeof (*data)))
                                 err = -EFAULT;
                 break;
-
+        }
         case IOC_PORTAL_FAIL_NID: {
                 const ptl_handle_ni_t *nip;
 
@@ -643,6 +655,7 @@ EXPORT_SYMBOL(kportal_assertion_failed);
 EXPORT_SYMBOL(dispatch_name);
 EXPORT_SYMBOL(kportal_get_ni);
 EXPORT_SYMBOL(kportal_put_ni);
+EXPORT_SYMBOL(kportal_nal_cmd);
 
 module_init(init_kportals_module);
 module_exit (exit_kportals_module);
index c6590db..9fb2759 100644 (file)
@@ -409,6 +409,7 @@ int main(int argc, char **argv)
                 int len = sizeof(clntaddr);
                 int cfd;
                 struct portal_ioctl_data data;
+                struct portals_cfg pcfg;
                 ptl_nid_t peer_nid;
                 
                 cfd = accept(fd, (struct sockaddr *)&clntaddr, &len);
@@ -441,13 +442,16 @@ int main(int argc, char **argv)
                 }
 
                 show_connection (cfd, clntaddr.sin_addr.s_addr, peer_nid);
-                
+
+                PCFG_INIT(pcfg, NAL_CMD_REGISTER_PEER_FD);
+                pcfg.pcfg_nal = nal;
+                pcfg.pcfg_fd = cfd;
+                pcfg.pcfg_nid = peer_nid;
+                pcfg.pcfg_flags = bind_irq;
+
                 PORTAL_IOC_INIT(data);
-                data.ioc_fd = cfd;
-                data.ioc_nal = nal;
-                data.ioc_nal_cmd = NAL_CMD_REGISTER_PEER_FD;
-                data.ioc_nid = peer_nid;
-                data.ioc_flags = bind_irq;
+                data.ioc_pbuf1 = (char*)&pcfg;
+                data.ioc_plen1 = sizeof(pcfg);
                 
                 if (ioctl(pfd, IOC_PORTAL_NAL_CMD, &data) < 0) {
                         perror("ioctl failed");
index 701a814..b401bb0 100644 (file)
@@ -50,6 +50,7 @@ int main(int argc, char **argv)
 {
         int rc, pfd;
         struct portal_ioctl_data data;
+        struct portals_cfg pcfg;
        unsigned int    nid = 0, len;
        char    *name = NULL;
        int     c;
@@ -76,21 +77,23 @@ int main(int argc, char **argv)
 
 
 
-        PORTAL_IOC_INIT (data);
+
+        PCFG_INIT(pcfg, GMNAL_IOC_GET_GNID);
+        pcfg.pcfg_nal = GMNAL;
 
        /*
         *      set up the inputs
         */
        len = strlen(name) + 1;
-       data.ioc_pbuf1 = malloc(len);
-       strcpy(data.ioc_pbuf1, name);
-       data.ioc_plen1 = len;
+       pcfg.pcfg_pbuf1 = malloc(len);
+       strcpy(pcfg.pcfg_pbuf1, name);
+       pcfg.pcfg_plen1 = len;
 
        /*
         *      set up the outputs
         */
-       data.ioc_pbuf2 = (void*)&nid;
-       data.ioc_plen2 = sizeof(unsigned int*);
+       pcfg.pcfg_pbuf2 = (void*)&nid;
+       pcfg.pcfg_plen2 = sizeof(unsigned int*);
 
         pfd = open("/dev/portals", O_RDWR);
         if ( pfd < 0 ) {
@@ -99,12 +102,10 @@ int main(int argc, char **argv)
                 exit(-1);
         }
 
-        data.ioc_nal = GMNAL;
-       data.ioc_nal_cmd = GMNAL_IOC_GET_GNID;
-/*
-       data.ioc_len += data.ioc_inllen1;
-       data.ioc_len += data.ioc_plen1;
-*/
+        PORTAL_IOC_INIT(data);
+        data.ioc_pbuf1 = (char*)&pcfg;
+        data.ioc_plen1 = sizeof(pcfg);
+                
         rc = ioctl (pfd, IOC_PORTAL_NAL_CMD, &data);
         if (rc < 0)
         {
index c608c28..8c4ebfe 100644 (file)
@@ -69,6 +69,38 @@ static name2num_t nalnames[] = {
         {NULL,         -1}
 };
 
+static cfg_record_cb_t g_record_cb;
+
+int 
+ptl_set_cfg_record_cb(cfg_record_cb_t cb)
+{
+        g_record_cb = cb;
+        return 0;
+}
+
+int 
+pcfg_ioctl(struct portals_cfg *pcfg) 
+{
+        int rc;
+
+        pcfg->pcfg_nal    = g_nal;
+
+        if (g_record_cb) {
+                rc = g_record_cb(PORTALS_CFG_TYPE, sizeof(*pcfg), pcfg);
+        } else {
+                struct portal_ioctl_data data;
+                PORTAL_IOC_INIT (data);
+                data.ioc_pbuf1   = (char*)pcfg;
+                data.ioc_plen1   = sizeof(*pcfg);
+
+                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        }
+
+        return (rc);
+}
+
+
+
 static name2num_t *
 name2num_lookup_name (name2num_t *table, char *str)
 {
@@ -387,7 +419,7 @@ int jt_ptl_network(int argc, char **argv)
 int 
 jt_ptl_print_autoconnects (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         char                     buffer[64];
         int                      index;
         int                      rc;
@@ -396,24 +428,22 @@ jt_ptl_print_autoconnects (int argc, char **argv)
                 return -1;
 
         for (index = 0;;index++) {
-                PORTAL_IOC_INIT (data);
-                data.ioc_nal     = g_nal;
-                data.ioc_nal_cmd = NAL_CMD_GET_AUTOCONN;
-                data.ioc_count   = index;
-                
-                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+                PCFG_INIT (pcfg, NAL_CMD_GET_AUTOCONN);
+                pcfg.pcfg_count   = index;
+
+                rc = pcfg_ioctl (&pcfg);
                 if (rc != 0)
                         break;
 
                 printf (LPX64"@%s:%d #%d buffer %d nonagle %s xchg %s "
                         "affinity %s eager %s share %d\n",
-                        data.ioc_nid, ptl_ipaddr_2_str (data.ioc_id, buffer),
-                        data.ioc_misc, data.ioc_count, data.ioc_size, 
-                        (data.ioc_flags & 1) ? "on" : "off",
-                        (data.ioc_flags & 2) ? "on" : "off",
-                        (data.ioc_flags & 4) ? "on" : "off",
-                        (data.ioc_flags & 8) ? "on" : "off",
-                        data.ioc_wait);
+                        pcfg.pcfg_nid, ptl_ipaddr_2_str (pcfg.pcfg_id, buffer),
+                        pcfg.pcfg_misc, pcfg.pcfg_count, pcfg.pcfg_size, 
+                        (pcfg.pcfg_flags & 1) ? "on" : "off",
+                        (pcfg.pcfg_flags & 2) ? "on" : "off",
+                        (pcfg.pcfg_flags & 4) ? "on" : "off",
+                        (pcfg.pcfg_flags & 8) ? "on" : "off",
+                        pcfg.pcfg_wait);
         }
 
         if (index == 0)
@@ -424,7 +454,7 @@ jt_ptl_print_autoconnects (int argc, char **argv)
 int 
 jt_ptl_add_autoconnect (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         ptl_nid_t                nid;
         __u32                    ip;
         int                      port;
@@ -482,21 +512,19 @@ jt_ptl_add_autoconnect (int argc, char **argv)
                         }
         }
 
-        PORTAL_IOC_INIT (data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_ADD_AUTOCONN;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ip;
-        data.ioc_misc    = port;
+        PCFG_INIT(pcfg, NAL_CMD_ADD_AUTOCONN);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ip;
+        pcfg.pcfg_misc    = port;
         /* only passing one buffer size! */
-        data.ioc_size    = MAX (g_socket_rxmem, g_socket_txmem);
-        data.ioc_flags   = (g_socket_nonagle ? 0x01 : 0) |
+        pcfg.pcfg_size    = MAX (g_socket_rxmem, g_socket_txmem);
+        pcfg.pcfg_flags   = (g_socket_nonagle ? 0x01 : 0) |
                            (xchange_nids     ? 0x02 : 0) |
                            (irq_affinity     ? 0x04 : 0) |
                            (share            ? 0x08 : 0) |
                            (eager            ? 0x10 : 0);
 
-        rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl (&pcfg);
         if (rc != 0) {
                 fprintf (stderr, "failed to enable autoconnect: %s\n",
                          strerror (errno));
@@ -509,7 +537,7 @@ jt_ptl_add_autoconnect (int argc, char **argv)
 int 
 jt_ptl_del_autoconnect (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg       pcfg;
         ptl_nid_t                nid = PTL_NID_ANY;
         __u32                    ip  = 0;
         int                      share = 0;
@@ -555,15 +583,13 @@ jt_ptl_del_autoconnect (int argc, char **argv)
                         }
         }
 
-        PORTAL_IOC_INIT (data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_DEL_AUTOCONN;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ip;
-        data.ioc_flags   = (share     ? 1 : 0) |
+        PCFG_INIT(pcfg, NAL_CMD_DEL_AUTOCONN);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ip;
+        pcfg.pcfg_flags   = (share     ? 1 : 0) |
                            (keep_conn ? 2 : 0);
-        
-        rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+
+        rc = pcfg_ioctl (&pcfg);
         if (rc != 0) {
                 fprintf (stderr, "failed to remove autoconnect route: %s\n",
                          strerror (errno));
@@ -576,7 +602,7 @@ jt_ptl_del_autoconnect (int argc, char **argv)
 int 
 jt_ptl_print_connections (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg       pcfg;
         char                     buffer[64];
         int                      index;
         int                      rc;
@@ -585,19 +611,17 @@ jt_ptl_print_connections (int argc, char **argv)
                 return -1;
 
         for (index = 0;;index++) {
-                PORTAL_IOC_INIT (data);
-                data.ioc_nal     = g_nal;
-                data.ioc_nal_cmd = NAL_CMD_GET_CONN;
-                data.ioc_count   = index;
+                PCFG_INIT (pcfg,  NAL_CMD_GET_CONN);
+                pcfg.pcfg_count   = index;
                 
-                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+                rc = pcfg_ioctl (&pcfg);
                 if (rc != 0)
                         break;
 
                 printf (LPX64"@%s:%d\n",
-                        data.ioc_nid, 
-                        ptl_ipaddr_2_str (data.ioc_id, buffer),
-                        data.ioc_misc);
+                        pcfg.pcfg_nid, 
+                        ptl_ipaddr_2_str (pcfg.pcfg_id, buffer),
+                        pcfg.pcfg_misc);
         }
 
         if (index == 0)
@@ -681,6 +705,7 @@ int jt_ptl_connect(int argc, char **argv)
 {
         ptl_nid_t peer_nid;
         struct portal_ioctl_data data;
+        struct portals_cfg pcfg;
         struct sockaddr_in srvaddr;
         __u32 ipaddr;
         char *flag;
@@ -805,14 +830,12 @@ int jt_ptl_connect(int argc, char **argv)
         printf("Connected host: %s NID "LPX64" snd: %d rcv: %d nagle: %s\n", argv[1],
                peer_nid, txmem, rxmem, nonagle ? "Disabled" : "Enabled");
 
-        PORTAL_IOC_INIT(data);
-        data.ioc_fd = fd;
-        data.ioc_nal = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_REGISTER_PEER_FD;
-        data.ioc_nid = peer_nid;
-        data.ioc_flags = bind_irq;
+        PCFG_INIT(pcfg, NAL_CMD_REGISTER_PEER_FD);
+        pcfg.pcfg_fd = fd;
+        pcfg.pcfg_nid = peer_nid;
+        pcfg.pcfg_flags = bind_irq;
 
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl(&pcfg);
         if (rc) {
                 fprintf(stderr, "failed to register fd with portals: %s\n", 
                         strerror(errno));
@@ -831,7 +854,7 @@ int jt_ptl_connect(int argc, char **argv)
 
 int jt_ptl_disconnect(int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         ptl_nid_t                nid = PTL_NID_ANY;
         __u32                    ipaddr = 0;
         int                      rc;
@@ -856,13 +879,11 @@ int jt_ptl_disconnect(int argc, char **argv)
                 return -1;
         }
 
-        PORTAL_IOC_INIT(data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_CLOSE_CONNECTION;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ipaddr;
+        PCFG_INIT(pcfg, NAL_CMD_CLOSE_CONNECTION);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ipaddr;
         
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl(&pcfg);
         if (rc) {
                 fprintf(stderr, "failed to remove connection: %s\n",
                         strerror(errno));
@@ -874,7 +895,7 @@ int jt_ptl_disconnect(int argc, char **argv)
 
 int jt_ptl_push_connection (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         int                      rc;
         ptl_nid_t                nid = PTL_NID_ANY;
         __u32                    ipaddr = 0;
@@ -898,13 +919,11 @@ int jt_ptl_push_connection (int argc, char **argv)
                 fprintf(stderr, "Can't parse ipaddr: %s\n", argv[2]);
         }
 
-        PORTAL_IOC_INIT(data);
-        data.ioc_nal     = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_PUSH_CONNECTION;
-        data.ioc_nid     = nid;
-        data.ioc_id      = ipaddr;
-
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        PCFG_INIT(pcfg, NAL_CMD_PUSH_CONNECTION);
+        pcfg.pcfg_nid     = nid;
+        pcfg.pcfg_id      = ipaddr;
+        
+        rc = pcfg_ioctl(&pcfg);
         if (rc) {
                 fprintf(stderr, "failed to push connection: %s\n",
                         strerror(errno));
@@ -917,7 +936,7 @@ int jt_ptl_push_connection (int argc, char **argv)
 int 
 jt_ptl_print_active_txs (int argc, char **argv)
 {
-        struct portal_ioctl_data data;
+        struct portals_cfg        pcfg;
         int                      index;
         int                      rc;
 
@@ -925,28 +944,26 @@ jt_ptl_print_active_txs (int argc, char **argv)
                 return -1;
 
         for (index = 0;;index++) {
-                PORTAL_IOC_INIT (data);
-                data.ioc_nal     = g_nal;
-                data.ioc_nal_cmd = NAL_CMD_GET_TXDESC;
-                data.ioc_count   = index;
-                
-                rc = l_ioctl (PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+                PCFG_INIT(pcfg, NAL_CMD_GET_TXDESC);
+                pcfg.pcfg_count   = index;
+        
+                rc = pcfg_ioctl(&pcfg);
                 if (rc != 0)
                         break;
 
                 printf ("%p: %5s payload %6d bytes to "LPX64" via "LPX64" by pid %6d: %s, %s, state %d\n",
-                        data.ioc_pbuf1,
-                        data.ioc_count == PTL_MSG_ACK ? "ACK" :
-                        data.ioc_count == PTL_MSG_PUT ? "PUT" :
-                        data.ioc_count == PTL_MSG_GET ? "GET" :
-                        data.ioc_count == PTL_MSG_REPLY ? "REPLY" : "<wierd message>",
-                        data.ioc_size,
-                        data.ioc_nid,
-                        data.ioc_nid2,
-                        data.ioc_misc,
-                        (data.ioc_flags & 1) ? "delayed" : "immediate",
-                        (data.ioc_flags & 2) ? "nblk"    : "normal",
-                        data.ioc_flags >> 2);
+                        pcfg.pcfg_pbuf1,
+                        pcfg.pcfg_count == PTL_MSG_ACK ? "ACK" :
+                        pcfg.pcfg_count == PTL_MSG_PUT ? "PUT" :
+                        pcfg.pcfg_count == PTL_MSG_GET ? "GET" :
+                        pcfg.pcfg_count == PTL_MSG_REPLY ? "REPLY" : "<wierd message>",
+                        pcfg.pcfg_size,
+                        pcfg.pcfg_nid,
+                        pcfg.pcfg_nid2,
+                        pcfg.pcfg_misc,
+                        (pcfg.pcfg_flags & 1) ? "delayed" : "immediate",
+                        (pcfg.pcfg_flags & 2) ? "nblk"    : "normal",
+                        pcfg.pcfg_flags >> 2);
         }
 
         if (index == 0)
@@ -1039,7 +1056,7 @@ int jt_ptl_mynid(int argc, char **argv)
         int rc;
         char hostname[1024];
         char *nidstr;
-        struct portal_ioctl_data data;
+        struct portals_cfg pcfg;
         ptl_nid_t mynid;
         
         if (argc > 2) {
@@ -1067,12 +1084,10 @@ int jt_ptl_mynid(int argc, char **argv)
                 return -1;
         }
         
-        PORTAL_IOC_INIT(data);
-        data.ioc_nid = mynid;
-        data.ioc_nal = g_nal;
-        data.ioc_nal_cmd = NAL_CMD_REGISTER_MYNID;
+        PCFG_INIT(pcfg, NAL_CMD_REGISTER_MYNID);
+        pcfg.pcfg_nid = mynid;
 
-        rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
+        rc = pcfg_ioctl(&pcfg);
         if (rc < 0)
                 fprintf(stderr, "setting my NID failed: %s\n",
                        strerror(errno));
index 8ae2c6e..c2e90f8 100644 (file)
@@ -38,7 +38,7 @@
 int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
 {
         struct ptlrpc_connection *conn;
-        struct obd_ioctl_data* data = buf;
+        struct lustre_cfg* lcfg = buf;
         struct client_obd *cli = &obddev->u.cli;
         struct obd_import *imp;
         struct obd_uuid server_uuid;
@@ -66,29 +66,29 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
                 RETURN(-EINVAL);
         }
 
-        if (data->ioc_inllen1 < 1) {
+        if (lcfg->lcfg_inllen1 < 1) {
                 CERROR("requires a TARGET UUID\n");
                 RETURN(-EINVAL);
         }
 
-        if (data->ioc_inllen1 > 37) {
+        if (lcfg->lcfg_inllen1 > 37) {
                 CERROR("client UUID must be less than 38 characters\n");
                 RETURN(-EINVAL);
         }
 
-        if (data->ioc_inllen2 < 1) {
+        if (lcfg->lcfg_inllen2 < 1) {
                 CERROR("setup requires a SERVER UUID\n");
                 RETURN(-EINVAL);
         }
 
-        if (data->ioc_inllen2 > 37) {
+        if (lcfg->lcfg_inllen2 > 37) {
                 CERROR("target UUID must be less than 38 characters\n");
                 RETURN(-EINVAL);
         }
 
         sema_init(&cli->cl_sem, 1);
         cli->cl_conn_count = 0;
-        memcpy(server_uuid.uuid, data->ioc_inlbuf2, MIN(data->ioc_inllen2,
+        memcpy(server_uuid.uuid, lcfg->lcfg_inlbuf2, MIN(lcfg->lcfg_inllen2,
                                                         sizeof(server_uuid)));
 
         init_MUTEX(&cli->cl_dirty_sem);
@@ -124,7 +124,7 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
         imp->imp_connect_op = connect_op;
         imp->imp_generation = 0;
         INIT_LIST_HEAD(&imp->imp_pinger_chain);
-        memcpy(imp->imp_target_uuid.uuid, data->ioc_inlbuf1, data->ioc_inllen1);
+        memcpy(imp->imp_target_uuid.uuid, lcfg->lcfg_inlbuf1, lcfg->lcfg_inllen1);
         class_import_put(imp);
 
         cli->cl_import = imp;
@@ -133,8 +133,8 @@ int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
         cli->cl_sandev = to_kdev_t(0);
 
         /* Register with management client if we need to. */
-        if (data->ioc_inllen3 > 0) {
-                char *mgmt_name = data->ioc_inlbuf3;
+        if (lcfg->lcfg_inllen3 > 0) {
+                char *mgmt_name = lcfg->lcfg_inlbuf3;
                 int rc;
                 struct obd_device *mgmt_obd;
                 mgmtcli_register_for_events_t register_f;
index 2368f0e..d764702 100755 (executable)
@@ -8,13 +8,13 @@ LUSTRE=${LUSTRE:-`dirname $0`/..}
 init_test_env
 
 # XXX I wish all this stuff was in some default-config.sh somewhere
+MOUNT=${MOUNT:-/mnt/lustre}
 MDSDEV=${MDSDEV:-/tmp/mds-`hostname`}
 MDSSIZE=${MDSSIZE:-100000}
 OSTDEV=${OSTDEV:-/tmp/ost-`hostname`}
 OSTSIZE=${OSTSIZE:-100000}
 MOUNT1=${MOUNT1:-${MOUNT}1}
 MOUNT2=${MOUNT2:-${MOUNT}2}
-MOUNT=${MOUNT1}
 UPCALL=${UPCALL:-$PWD/replay-single-upcall.sh}
 FSTYPE=${FSTYPE:-ext3}
 TIMEOUT=${TIMEOUT:-5}
@@ -26,19 +26,35 @@ gen_config() {
     rm -f replay-dual.xml
     add_facet mds
     add_facet ost
-    add_facet client1 --lustre_upcall $UPCALL
-    add_facet client2 --lustre_upcall $UPCALL
+    add_facet client --lustre_upcall $UPCALL
     do_lmc --add mds --node mds_facet --mds mds1 --dev $MDSDEV --size $MDSSIZE
+    do_lmc --add lov --mds mds1 --lov lov1 --stripe_sz $STRIPE_BYTES --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0
     do_lmc --add ost --lov lov1 --node ost_facet --ost ost1 --dev $OSTDEV --size $OSTSIZE
-    do_lmc --add mtpt --node client1_facet --path $MOUNT1 --mds mds1 --ost ost1
-    do_lmc --add mtpt --node client2_facet --path $MOUNT2 --mds mds1 --ost ost1
+    do_lmc --add ost --lov lov1 --node ost_facet --ost ost2 --dev ${OSTDEV}-2 --size $OSTSIZE
+    do_lmc --add mtpt --node client_facet --path $MOUNT --mds mds1 --ost lov1
 }
 
 
 build_test_filter
 
+cleanup() {
+    [ "$DAEMONFILE" ] && lctl debug_daemon stop
+    umount $MOUNT2
+    umount $MOUNT1
+    rmmod llite
+    stop mds ${FORCE} --dump cleanup-dual.log
+    stop ost ${FORCE}
+}
+
+if [ "$ONLY" == "cleanup" ]; then
+    sysctl -w portals.debug=0
+    cleanup
+    exit
+fi
+
 gen_config
-start mds --reformat
+start ost --reformat
+start mds --reformat --write_conf
 PINGER=`cat /proc/fs/lustre/pinger`
 
 if [ "$PINGER" != "on" ]; then
@@ -47,9 +63,14 @@ if [ "$PINGER" != "on" ]; then
     exit 1
 fi
 
-start ost --reformat
-start client1
-start client2
+insmod ../llite/llite.o || true
+[ -d $MOUNT1 ] || mkdir $MOUNT1
+[ -d $MOUNT2 ] || mkdir $MOUNT2
+
+mount -t lustre_lite -o mds_uuid=mds1_UUID,profile=client_facet replay-single $MOUNT1
+mount -t lustre_lite -o mds_uuid=mds1_UUID,profile=client_facet replay-single $MOUNT2
+
+[ "$DAEMONFILE" ] && lctl debug_daemon start $DAEMONFILE $DAEMONSIZE
 
 test_1() {
     touch $MOUNT1/a
@@ -158,7 +179,3 @@ run_test 6 "open1, open2, unlink |X| close1 [fail mds] close2"
 
 
 equals_msg test complete, cleaning up
-stop client2 ${FORCE:=--force} --nomod
-stop client1 ${FORCE}
-stop ost ${FORCE}
-stop mds ${FORCE} --dump cleanup-dual.log
index 37daa31..4b08afa 100755 (executable)
@@ -41,7 +41,8 @@ build_test_filter
 
 cleanup() {
     [ "$DAEMONFILE" ] && lctl debug_daemon stop
-    stop client ${FORCE:=--force} $CLIENTLCONFARGS
+    umount $MOUNT
+    rmmod llite
     stop mds ${FORCE} $MDSLCONFARGS --dump cleanup.log
     stop ost ${FORCE}
 }
@@ -55,8 +56,12 @@ fi
 gen_config
 
 start ost --reformat $OSTLCONFARGS
-start mds --reformat $MDSLCONFARGS
-start client --gdb $CLIENTLCONFARGS
+start mds --write_conf --reformat $MDSLCONFARGS
+# start client --gdb $CLIENTLCONFARGS
+insmod ../llite/llite.o || true
+[ -d $MOUNT ] || mkdir $MOUNT 
+
+mount -t lustre_lite -o mds_uuid=mds1_UUID,profile=client_facet replay-single $MOUNT
 
 [ "$DAEMONFILE" ] && lctl debug_daemon start $DAEMONFILE $DAEMONSIZE