Problems Arla-0.2 on FreeBSD
Assar Westerlund
assar at sics.se
Sat Mar 21 20:51:42 CET 1998
Mark A Gebert <geeb at merit.edu> writes:
> - After using AFS for awhile arlad will hang:
Try the appended patch.
/assar
--- fcache.c.orig Mon Mar 16 11:16:39 1998
+++ fcache.c Sat Mar 21 20:51:21 1998
@@ -920,8 +920,9 @@
ret = rx_Read (call, &sizefs, sizeof(sizefs));
if (ret != sizeof(sizefs)) {
- arla_log (ADEBMISC, "Error reading length");
ret = rx_Error(call);
+ arla_log (ADEBMISC, "Error reading length: %d", ret);
+ rx_EndCall(call, 0);
goto out;
}
sizefs = ntohl (sizefs);
@@ -932,11 +933,15 @@
if (fd < 0) {
arla_log (ADEBMISC, "open cache file %u failed", entry->inode);
ret = errno;
+ rx_EndCall(call, 0);
goto out;
}
- if (copyrx2fd (call, fd, sizefs))
- arla_log (ADEBMISC, "Error reading");
+ if (copyrx2fd (call, fd, sizefs)) {
+ ret = errno;
+ rx_EndCall(call, ret);
+ arla_log (ADEBMISC, "Error during copyrx2fd: %d", ret);
+ }
usedbytes += sizefs; /* XXX - sync */
@@ -1022,11 +1027,16 @@
if (ret) {
arla_log (ADEBMISC, "Could not start store, %s (%d)",
koerr_gettext(ret), ret);
+ rx_EndCall(call, 0);
goto out;
}
- if (copyfd2rx (fd, call, sizefs))
- arla_log (ADEBMISC, "copyfd2rx failed");
+ if (copyfd2rx (fd, call, sizefs)) {
+ ret = errno;
+ rx_EndCall(call, ret);
+ arla_log (ADEBMISC, "copyfd2rx failed: %d", ret);
+ goto out;
+ }
ret = rx_EndCall (call, EndRXAFS_StoreData (call,
&status,
@@ -1108,19 +1118,22 @@
if(ret) {
arla_log (ADEBMISC, "Could not start store, %s (%d)",
koerr_gettext(ret), ret);
+ rx_EndCall(call, 0);
goto out;
}
sizefs = htonl (sizefs);
if (rx_Write (call, &sizefs, sizeof(sizefs)) != sizeof(sizefs)) {
- arla_log (ADEBMISC, "Error writing length");
ret = rx_Error(call);
+ arla_log (ADEBMISC, "Error writing length: %d", ret);
+ rx_EndCall(call, 0);
goto out;
}
if (rx_Write (call, 0, 0) != 0) {
- arla_log (ADEBMISC, "Error writing");
ret = rx_Error(call);
+ arla_log (ADEBMISC, "Error writing: %d", ret);
+ rx_EndCall(call, 0);
goto out;
}
More information about the Arla-drinkers
mailing list