diff -urN pvfs-kernel-1.6.3-pre3-linux-2.4/kpvfs_v1_xfer.c pvfs-kernel-1.6.3-pre3-linux-2.4-working/kpvfs_v1_xfer.c --- pvfs-kernel-1.6.3-pre3-linux-2.4/kpvfs_v1_xfer.c Fri May 14 14:30:08 2004 +++ pvfs-kernel-1.6.3-pre3-linux-2.4-working/kpvfs_v1_xfer.c Thu Jul 29 13:50:13 2004 @@ -1581,6 +1581,7 @@ char *fn; void *ptr = NULL; static int do_open_called = 0; + ireq iodreq; if (do_open_called == 0) { do_open_called = 1; @@ -1693,7 +1694,39 @@ /* Set the default preallocation count to the number of IOD servers of this open */ default_alloc = ct; } - return fp; + + /* + * Send NOOP to all IODs to refresh any stale socket descriptors that have + * resulted from the MGR or IODs being bounced. + */ + memset(&iodreq, 0, sizeof(iodreq)); + + iodreq.majik_nr = IOD_MAJIK_NR; + iodreq.release_nr = PVFS_RELEASE_NR; + iodreq.type = IOD_NOOP; + iodreq.dsize = 0; + + if (active_p == NULL) + { + active_p = jlist_new(); + } + + initset(&socks); /* clears out socket set */ + + error = build_simple_jobs(fp, &iodreq); + if (error < 0) + { + PDEBUG(D_LIB,"error building simple job %d",error); + goto open_pvfs_file_error; + } + + while (jlist_empty(active_p) == 0) + { + /* Do the jobs. Don't handle error conditions. Just continue. */ + do_jobs(active_p, &socks, -1); + } + + return fp; open_pvfs_file_error: if (p != NULL) { diff -urN pvfs-kernel-1.6.3-pre3-linux-2.4/pvfs_v1_xfer.c pvfs-kernel-1.6.3-pre3-linux-2.4-working/pvfs_v1_xfer.c --- pvfs-kernel-1.6.3-pre3-linux-2.4/pvfs_v1_xfer.c Tue Feb 10 13:25:40 2004 +++ pvfs-kernel-1.6.3-pre3-linux-2.4-working/pvfs_v1_xfer.c Thu Jul 29 14:01:11 2004 @@ -1572,6 +1572,7 @@ char *fn; void *ptr = NULL; static int do_open_called = 0; + ireq iodreq; if (do_open_called == 0) { do_open_called = 1; @@ -1679,6 +1680,38 @@ /* Set the default preallocation count to the number of IOD servers of this open */ default_alloc = ct; } + + /* + * Send NOOP to all IODs to refresh any stale socket descriptors that have + * resulted from the MGR or IODs being bounced. + */ + memset(&iodreq, 0, sizeof(iodreq)); + + iodreq.majik_nr = IOD_MAJIK_NR; + iodreq.release_nr = PVFS_RELEASE_NR; + iodreq.type = IOD_NOOP; + iodreq.dsize = 0; + + if (active_p == NULL) + { + active_p = jlist_new(); + } + + initset(&socks); /* clears out socket set */ + + error = build_simple_jobs(fp, &iodreq); + if (error < 0) + { + PDEBUG(D_LIB,"error building simple job %d",error); + goto open_pvfs_file_error; + } + + while (jlist_empty(active_p) == 0) + { + /* Do the jobs. Don't handle error conditions. Just continue. */ + do_jobs(active_p, &socks, -1); + } + return fp; open_pvfs_file_error: