[683] in arla-drinkers
RE: "Waiting for busy volume" == "Network is down." ?
daemon@ATHENA.MIT.EDU (Neulinger, Nathan R.)
Thu Mar 11 16:31:30 1999
From owner-arla-drinkers@stacken.kth.se Thu Mar 11 21:31:28 1999
Return-Path: <owner-arla-drinkers@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 21126 invoked from network); 11 Mar 1999 21:31:27 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
by bloom-picayune.mit.edu with SMTP; 11 Mar 1999 21:31:27 -0000
Received: (from majordom@localhost)
by sundance.stacken.kth.se (8.8.8/8.8.8) id WAA24906
for arla-drinkers-list; Thu, 11 Mar 1999 22:25:07 +0100 (MET)
Received: from umr.edu (hermes.cc.umr.edu [131.151.1.68])
by sundance.stacken.kth.se (8.8.8/8.8.8) with ESMTP id WAA24899;
Thu, 11 Mar 1999 22:25:00 +0100 (MET)
Received: from umr-mail01.cc.umr.edu (umr-mail01.cc.umr.edu [131.151.37.121]) via ESMTP by hermes.cc.umr.edu (8.8.7/R.4.20) id PAA18924; Thu, 11 Mar 1999 15:24:54 -0600 (CST)
Received: by umr-mail01.cc.umr.edu with Internet Mail Service (5.5.2232.9)
id <GM967N61>; Thu, 11 Mar 1999 15:24:54 -0600
Message-ID: <9DA8D24B915BD1118911006094516EAF019C7FF1@umr-mail02.cc.umr.edu>
From: "Neulinger, Nathan R." <nneul@umr.edu>
To: "'Love'" <lha@stacken.kth.se>
Cc: "'arla-drinkers@stacken.kth.se'" <arla-drinkers@stacken.kth.se>
Subject: RE: "Waiting for busy volume" == "Network is down." ?
Date: Thu, 11 Mar 1999 15:24:53 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2232.9)
Content-Type: text/plain;
charset="ISO-8859-1"
Sender: owner-arla-drinkers@stacken.kth.se
Precedence: bulk
This seemed to work ok, had a few syntax errors that I fixed though.
Seems as stable as anything else, haven't tried it with a busy volume yet
though.
-- Nathan
------------------------------------------------------------
Nathan Neulinger EMail: nneul@umr.edu
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services Fax: (573) 341-4216
> -----Original Message-----
> From: Love [mailto:lha@stacken.kth.se]
> Sent: Wednesday, March 10, 1999 6:28 PM
> To: Neulinger, Nathan R.
> Cc: 'arla-drinkers@stacken.kth.se'
> Subject: Re: "Waiting for busy volume" == "Network is down." ?
>
>
> Love <lha@stacken.kth.se> writes:
>
> > "Neulinger, Nathan R." <nneul@umr.edu> writes:
> >
> > > The message returned is a little odd... It should be
> waiting for busy
> > > volume, but it prints network is down instead. This is on
> linux 2.2.x.
> >
> > It tries next availble fsserver se try_next_fs() in arlad/fcache.c.
> > Guess it should sleep a a while and then do the loop again
> when it runs out
> > of fileservers.
> >
> > Love, whom is trying to fetch the subway home.
>
> Since i missed the last train you'll get a patch too :(
> Have not tried to compile it, I don't think this a a good
> solution but it
> will probably work.
>
> Love, now waiting for night-busses.
>
> Index: arlad/fcache.h
> ===================================================================
> RCS file: /usr/local/cvsroot/arla/arlad/fcache.h,v
> retrieving revision 1.48
> diff -u -w -u -w -r1.48 arlad/fcache.h
> --- arlad/fcache.h 1999/01/10 20:25:57 1.48
> +++ arlad/fcache.h 1999/03/11 00:24:52
> @@ -319,7 +319,7 @@
> fs_server_context *context);
>
> ConnCacheEntry *
> -find_next_fs (fs_server_context *context, ConnCacheEntry *prev_conn);
> +find_next_fs (fs_server_context *context, ConnCacheEntry
> *prev_conn, int error);
>
> void
> free_fs_server_context (fs_server_context *context);
> Index: arlad/fcache.c
> ===================================================================
> RCS file: /usr/local/cvsroot/arla/arlad/fcache.c,v
> retrieving revision 1.182
> diff -u -w -u -w -r1.182 arla/dfcache.c
> --- arlad/fcache.c 1999/03/02 08:50:06 1.182
> +++ arlad/fcache.c 1999/03/11 00:22:22
> @@ -893,22 +893,32 @@
> return FALSE;
> }
>
> +static Bool
> +retry_next_fs (int error); /* XXX */
> +
> +
> /*
> * Find the next fileserver for the request in `context'.
> * Returns a ConnCacheEntry or NULL.
> */
>
> -ConnCacheEntry *
> -find_next_fs (fs_server_context *context, ConnCacheEntry *prev_conn)
> +static ConnCacheEntry *
> +find_next_fs (fs_server_context *context, ConnCacheEntry *prev_conn,
> + int error)
> {
> if (prev_conn != NULL)
> conn_dead (prev_conn);
>
> if (context->i < context->num_conns)
> return context->conns[context->i++];
> - else
> + else {
> + if (retry_next_fs (error)) {
> + context->i = 0;
> + return context->conns[context->i++];
> + } else
> return NULL;
> }
> +}
>
> /*
> * Clean up a `fs_server_context'
> @@ -983,7 +993,7 @@
> context->num_conns = num_clones;
> context->i = 0;
>
> - return find_next_fs (context, NULL);
> + return find_next_fs (context, NULL, ARLA_VNOVOL);
> }
>
> /*
> @@ -1432,6 +1442,24 @@
> }
> }
>
> +static Bool
> +retry_next_fs (int error)
> +{
> + switch (error) {
> + case ARLA_VSALVAGE :
> + case ARLA_VBUSY :
> + return TRUE;
> + case ARLA_VNOVOL :
> + case ARLA_VNOSERVICE :
> + case ARLA_VOFFLINE :
> + case ARLA_VMOVED :
> + case ARLA_VIO :
> + case RX_CALL_DEAD :
> + case 0 :
> + return FALSE;
> + default :
> + return FALSE;
> + }
>
> /*
> * Fetch the attributes for the file in `entry' from the file_server,
> @@ -1454,7 +1482,7 @@
>
> for (conn = find_first_fs (entry, ce, ret_context);
> conn != NULL;
> - conn = find_next_fs (ret_context, conn)) {
> + conn = find_next_fs (ret_context, conn, ret)) {
> ret = RXAFS_FetchStatus (conn->connection,
> &entry->fid.fid,
> &status,
> @@ -1680,7 +1708,7 @@
>
> for (conn = find_first_fs (entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> call = rx_NewCall (conn->connection);
> if (call == NULL) {
> @@ -1791,7 +1819,7 @@
>
> for (conn = find_first_fs (entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> call = rx_NewCall (conn->connection);
> if (call == NULL) {
> @@ -1934,7 +1962,7 @@
>
> for (conn = find_first_fs (dir_entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> host = rx_HostOf (rx_PeerOf (conn->connection));
>
> @@ -2062,7 +2090,7 @@
>
> for (conn = find_first_fs (dir_entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> host = rx_HostOf(rx_PeerOf(conn->connection));
>
> @@ -2151,7 +2179,7 @@
>
> for (conn = find_first_fs (dir_entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> host = rx_HostOf(rx_PeerOf(conn->connection));
>
> @@ -2227,7 +2255,7 @@
>
> for (conn = find_first_fs (dir_entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> host = rx_HostOf(rx_PeerOf(conn->connection));
>
> @@ -2282,7 +2310,7 @@
>
> for (conn = find_first_fs (dir_entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> host = rx_HostOf(rx_PeerOf(conn->connection));
>
> @@ -2334,7 +2362,7 @@
>
> for (conn = find_first_fs (dir_entry, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> host = rx_HostOf(rx_PeerOf(conn->connection));
>
> @@ -2389,7 +2417,7 @@
>
> for (conn = find_first_fs (old_dir, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
>
> host = rx_HostOf(rx_PeerOf(conn->connection));
>
> @@ -2633,7 +2661,7 @@
>
> for (conn = find_first_fs (e, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
> ret = read_data (e, conn, ce);
> if (!try_next_fs (ret))
> break;
> @@ -3024,7 +3052,7 @@
>
> for (conn = find_first_fs (dire, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
> ret = RXAFS_FetchACL (conn->connection, &fid.fid,
> opaque, &status, &volsync);
> if (!try_next_fs (ret))
> @@ -3067,7 +3095,7 @@
>
> for (conn = find_first_fs (dire, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
> ret = RXAFS_StoreACL (conn->connection, &fid.fid,
> opaque, &status, &volsync);
> if (!try_next_fs (ret))
> @@ -3110,7 +3144,7 @@
>
> for (conn = find_first_fs (dire, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
> ret = RXAFS_GetVolumeStatus (conn->connection, fid.fid.Volume,
> volstat, volumename, offlinemsg,
> motd);
> @@ -3154,7 +3188,7 @@
>
> for (conn = find_first_fs (dire, ce, &context);
> conn != NULL;
> - conn = find_next_fs (&context, conn)) {
> + conn = find_next_fs (&context, conn, ret)) {
> ret = RXAFS_SetVolumeStatus (conn->connection, fid.fid.Volume,
> volstat, volumename, offlinemsg,
> motd);
>
>
>