[OpenAFS] 1.5.19 build fails on SunOS 5.11 snv62 SPARC
William Yang
wyang@tjhsst.edu
Tue, 15 May 2007 18:13:35 -0400 (EDT)
------=_Part_5907_2600642.1179267215375
Content-Type: multipart/alternative;
boundary="----=_Part_5908_21122013.1179267215375"
------=_Part_5908_21122013.1179267215375
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Oops, sorry about that. I was intending to thread on to http://lists.openafs.org/pipermail/openafs-info/2007-May/026189.html, but it looks like that didn't quite work the way I was hoping. Was a bit rushed at the time too.
I also forgot to mention, I am using OpenAFS 1.4.4 as opposed to 1.5.19 (which was being used in the previous thread).
I've attached the patch. FYI, though, I was a bit creative in applying it to rx_knet.c since I have very little knowledge of C, so hopefully I did it right. Thus far, AFS has not crashed on the machine which is using these patches, but it is a very lightly used development-only machine.
William Yang
TJHSST Student Systems Administrator
wyang@tjhsst.edu
----- Original Message -----
From: "Derrick J Brashear" <shadow@dementia.org>
To: "William Yang" <wyang@tjhsst.edu>
Cc: openafs-info@openafs.org
Sent: Tuesday, May 15, 2007 2:26:46 PM (GMT-0500) America/New_York
Subject: Re: [OpenAFS] 1.5.19 build fails on SunOS 5.11 snv62 SPARC
On Sun, 13 May 2007, William Yang wrote:
> I'd like to suggest incorporating a good version of this patch into the
Context is good. Maybe you could quote "this patch", or if you've tested
one, send it?
> main source tree since this bug also affects Solaris 10 Update 4 beta
> (which probably has backports from snv_6x). I've located one location in
> afs_server.c and two in rx_knet.c that are affected and which I manually
> patched based on the patch in the thread (in April).
------=_Part_5908_21122013.1179267215375
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3D'text/css'>body { font-family: 'Times New Roman';=
font-size: 12pt; color: #000000}</style></head><body>Oops, sorry about tha=
t. I was intending to thread on to http://lists.openafs.org/pipermail=
/openafs-info/2007-May/026189.html, but it looks like that didn't quite wor=
k the way I was hoping. Was a bit rushed at the time too.<br><br>I al=
so forgot to mention, I am using OpenAFS 1.4.4 as opposed to 1.5.19 (which =
was being used in the previous thread).<br><br>I've attached the patch.&nbs=
p; FYI, though, I was a bit creative in applying it to rx_knet.c since I ha=
ve very little knowledge of C, so hopefully I did it right. Thus far,=
AFS has not crashed on the machine which is using these patches, but it is=
a very lightly used development-only machine.<br><br>William Yang<br>=
TJHSST Student Systems Administrator<br>wyang@tjhsst.edu<br>=
<br>----- Original Message -----<br>From: "Derrick J Brashear" <shadow@d=
ementia.org><br>To: "William Yang" <wyang@tjhsst.edu><br>Cc: opena=
fs-info@openafs.org<br>Sent: Tuesday, May 15, 2007 2:26:46 PM (GMT-0500) Am=
erica/New_York<br>Subject: Re: [OpenAFS] 1.5.19 build fails on SunOS 5.11 s=
nv62 SPARC<br><br>On Sun, 13 May 2007, William Yang wrote:<br><br>> I'd =
like to suggest incorporating a good version of this patch into the<br><br>=
Context is good. Maybe you could quote "this patch", or if you've tested <b=
r>one, send it?<br><br>> main source tree since this bug also affects So=
laris 10 Update 4 beta <br>> (which probably has backports from snv_6x).=
I've located one location in <br>> afs_server.c and two in rx_knet.c th=
at are affected and which I manually <br>> patched based on the patch in=
the thread (in April).<br><br></body></html>
------=_Part_5908_21122013.1179267215375--
------=_Part_5907_2600642.1179267215375
Content-Type: application/octet-stream; name=afs_on_s10u4.patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=afs_on_s10u4.patch
--- src/afs/afs_server.c.orig Thu Nov 9 19:16:29 2006
+++ src/afs/afs_server.c Sun May 13 16:42:57 2007
@@ -1238,6 +1238,8 @@
#if defined(AFS_SUN5_ENV)
#ifdef AFS_SUN510_ENV
ill_walk_context_t ctx;
+ netstack_t *ns = netstack_find_by_stackid(GLOBAL_NETSTACKID);
+ ip_stack_t *ipst = ns->netstack_ip;
#else
extern struct ill_s *ill_g_headp;
long *addr = (long *)ill_g_headp;
@@ -1249,7 +1251,7 @@
if (sa)
sa->sa_iprank = 0;
#ifdef AFS_SUN510_ENV
- for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
+ for (ill = ILL_START_WALK_ALL(&ctx, ipst) ; ill ; ill = ill_next(&ctx, ill)) {
#else
for (ill = (struct ill_s *)*addr /*ill_g_headp */ ; ill;
ill = ill->ill_next) {
@@ -1313,6 +1315,9 @@
}
}
}
+#ifdef AFS_SUN510_ENV
+ netstack_rele(ns);
+#endif
#else
#ifndef USEIFADDR
struct ifnet *ifn = NULL;
--- src/rx/SOLARIS/rx_knet.c.orig Fri Apr 15 14:37:19 2005
+++ src/rx/SOLARIS/rx_knet.c Sun May 13 16:49:02 2007
@@ -74,6 +74,8 @@
int rxmtu, maxmtu;
#ifdef AFS_SUN510_ENV
ill_walk_context_t ctx;
+ netstack_t *ns = netstack_find_by_stackid(GLOBAL_NETSTACKID);
+ ip_stack_t *ipst = ns->netstack_ip;
#endif
int mtus[ADDRSPERSITE];
@@ -84,7 +86,7 @@
memset(addrs, 0, sizeof(addrs));
#ifdef AFS_SUN510_ENV
- for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
+ for (ill = ILL_START_WALK_ALL(&ctx, ipst) ; ill ; ill = ill_next(&ctx, ill)) {
#else
for (ill = ill_g_head; ill; ill = ill->ill_next) {
#endif
@@ -142,6 +144,9 @@
}
}
+#ifdef AFS_SUN510_ENV
+ netstack_rele(ns);
+#endif
return different;
}
@@ -155,6 +160,8 @@
int mtu = -1;
#ifdef AFS_SUN510_ENV
ill_walk_context_t ctx;
+ netstack_t *ns = netstack_find_by_stackid(GLOBAL_NETSTACKID);
+ ip_stack_t *ipst = ns->netstack_ip;
#endif
if (numMyNetAddrs == 0)
@@ -171,7 +178,7 @@
netMask = 0;
#ifdef AFS_SUN510_ENV
- for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
+ for (ill = ILL_START_WALK_ALL(&ctx, ipst) ; ill ; ill = ill_next(&ctx, ill)) {
#else
for (ill = ill_g_head; ill; ill = ill->ill_next) {
#endif
@@ -211,6 +218,9 @@
}
}
+#ifdef AFS_SUN510_ENV
+ netstack_rele(ns);
+#endif
return mtu;
}
------=_Part_5907_2600642.1179267215375--