"Waiting for busy volume" == "Network is down." ?

Neulinger, Nathan R. nneul at umr.edu
Thu Mar 11 22:25:07 CET 1999


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 at umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216 

> -----Original Message-----
> From: Love [mailto:lha at stacken.kth.se]
> Sent: Wednesday, March 10, 1999 6:28 PM
> To: Neulinger, Nathan R.
> Cc: 'arla-drinkers at stacken.kth.se'
> Subject: Re: "Waiting for busy volume" == "Network is down." ?
> 
> 
> Love <lha at stacken.kth.se> writes:
> 
> > "Neulinger, Nathan R." <nneul at 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);
> 
> 
> 





More information about the Arla-drinkers mailing list