cwfs: restore backup block even if directory block didnt got a new address
parent
9310110448
commit
c39aecc111
|
@ -1448,11 +1448,10 @@ cwrecur(Cw *cw, Off addr, int tag, int tag1, long qp)
|
|||
|
||||
cw->depth--;
|
||||
|
||||
if(na){
|
||||
if(b){
|
||||
p = getbuf(cw->dev, na, Brd);
|
||||
p = getbuf(cw->dev, na ? na : addr, Brd);
|
||||
if(!p || checktag(p, tag, qp)){
|
||||
fprint(2, "cwrecur: b/p null %s\n", cw->name);
|
||||
fprint(2, "cwrecur: b/p null\n");
|
||||
na = 0;
|
||||
} else {
|
||||
memmove(p->iobuf, b->iobuf, RBUFSIZE);
|
||||
|
@ -1460,7 +1459,10 @@ cwrecur(Cw *cw, Off addr, int tag, int tag1, long qp)
|
|||
}
|
||||
if(p)
|
||||
putbuf(p);
|
||||
putbuf(b);
|
||||
}
|
||||
|
||||
if(na){
|
||||
if(shouldstop){
|
||||
if(cw->falsehits < 10)
|
||||
fprint(2, "shouldstop %lld %lld t=%s %s\n",
|
||||
|
@ -1469,8 +1471,6 @@ cwrecur(Cw *cw, Off addr, int tag, int tag1, long qp)
|
|||
cw->falsehits++;
|
||||
}
|
||||
}
|
||||
if(b)
|
||||
putbuf(b);
|
||||
|
||||
return na;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue