Commit 9206b737 authored by Claes Sjofors's avatar Claes Sjofors

rt_neth_acp fix for lists changed during remote request when gdb lock is removed

parent 3c827674
...@@ -326,9 +326,15 @@ lockMountServers ( ...@@ -326,9 +326,15 @@ lockMountServers (
vl = pool_Qsucc(NULL, gdbroot->pool, vl) vl = pool_Qsucc(NULL, gdbroot->pool, vl)
) { ) {
vp = pool_Qitem(vl, gdb_sVolume, l.own_ll); vp = pool_Qitem(vl, gdb_sVolume, l.own_ll);
if ( vl->self == vl->flink) {
/* Connection lost and volume removed from own list */
errh_Error("Volume not owned any more, %s", vp->g.name.orig);
return;
}
if(!vp->l.flags.b.isConnected) { if(!vp->l.flags.b.isConnected) {
/* !!! Todo !!! How do we make this known ? */ /* !!! Todo !!! How do we make this known ? */
errh_Error("Volume not connected, %s", vp->g.name); errh_Error("Volume not connected, %s", vp->g.name.orig);
continue; continue;
} }
...@@ -349,7 +355,8 @@ lockMountServers ( ...@@ -349,7 +355,8 @@ lockMountServers (
} }
msp->msor = pool_ItemReference(NULL, gdbroot->pool, op); msp->msor = pool_ItemReference(NULL, gdbroot->pool, op);
op->l.flags.b.isMountServer = 1; op->l.flags.b.isMountServer = 1;
pool_QinsertPred(NULL, gdbroot->pool, &msp->nodms_ll, &np->nodms_lh); if ( msp->nodms_ll.self == msp->nodms_ll.flink && msp->nodms_ll.self == msp->nodms_ll.blink)
pool_QinsertPred(NULL, gdbroot->pool, &msp->nodms_ll, &np->nodms_lh);
if (0) errh_Info("Locking object %s", op->g.f.name.orig); if (0) errh_Info("Locking object %s", op->g.f.name.orig);
cvolc_LockObject(&sts, op); cvolc_LockObject(&sts, op);
......
...@@ -101,6 +101,8 @@ fetch ( ...@@ -101,6 +101,8 @@ fetch (
net_Free(NULL, rsp); net_Free(NULL, rsp);
pwr_Return(NULL, sts, lsts); pwr_Return(NULL, sts, lsts);
} }
if ( !vp->l.flags.b.isConnected)
pwr_Return(NULL, sts, GDH__CONNLOST);
for (i = 0, gop = &rsp->g[0]; i < rsp->count; i++, gop++) { for (i = 0, gop = &rsp->g[0]; i < rsp->count; i++, gop++) {
if ( vp->g.vid != gop->oid.vid) { if ( vp->g.vid != gop->oid.vid) {
......
...@@ -65,7 +65,7 @@ cvolcm_AddClassVolume( ...@@ -65,7 +65,7 @@ cvolcm_AddClassVolume(
const net_sGvolume *vp const net_sGvolume *vp
) )
{ {
gdb_sCclassVolume *ccvp; gdb_sCclassVolume *ccvp, *rp;
gdb_sVolume *cvp; gdb_sVolume *cvp;
...@@ -89,8 +89,11 @@ cvolcm_AddClassVolume( ...@@ -89,8 +89,11 @@ cvolcm_AddClassVolume(
ccvp->equalClasses = time_Acomp(&ccvp->time, &t) == 0 ? 1 : 0; ccvp->equalClasses = time_Acomp(&ccvp->time, &t) == 0 ? 1 : 0;
} }
ccvp = hash_Insert(sts, gdbroot->ccvol_ht, ccvp); rp = hash_Insert(sts, gdbroot->ccvol_ht, ccvp);
if (ccvp == NULL) errh_Bugcheck(GDH__WEIRD, "adding cached class volume"); if (rp == NULL) { /* This was previously a bugcheck but obviously can occur */
pool_Free(NULL, gdbroot->pool, ccvp);
return;
}
pool_QinsertPred(NULL, gdbroot->pool, &ccvp->ccvol_ll, &np->ccvol_lh); pool_QinsertPred(NULL, gdbroot->pool, &ccvp->ccvol_ll, &np->ccvol_lh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment