From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from duke.felloff.net ([216.126.196.34]) by ewsd; Wed Sep 19 05:11:13 EDT 2018 Message-ID: <3C0FAC2A693E7948ADA3371272FB9B78@felloff.net> Date: Wed, 19 Sep 2018 11:11:06 +0200 From: cinap_lenrek@felloff.net To: 9front@9front.org Subject: Re: [9front] Patch to bring 9front venti libventi up to date with 9legacy In-Reply-To: CADmmOS9HSacznjjot3wFDQD+3jDjave_M=ROnY5o7k4wPn=D_Q@mail.gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: YAML over ACPI base DOM layer what are these changes for? VtEntry oe seems to be unused? diff -r a3522064f5dc sys/src/libventi/file.c --- a/sys/src/libventi/file.c Wed Sep 19 01:11:49 2018 +0200 +++ b/sys/src/libventi/file.c Tue Sep 18 19:30:23 2018 -0500 @@ -503,6 +503,7 @@ VtBlock *b; int type; uchar *score; + VtEntry oe; switch(p->type){ case VtDataType: @@ -530,6 +531,8 @@ if(vtglobaltolocal(b->score) != NilBlock) return b; + + oe = *e; /* * Copy on write. @@ -597,6 +600,7 @@ shrinkdepth(VtFile *r, VtBlock *p, VtEntry *e, int depth) { VtBlock *b, *nb, *ob, *rb; + VtEntry oe; assert(ISLOCKED(r)); assert(depth <= VtPointerDepth); @@ -604,6 +608,12 @@ rb = vtcacheglobal(r->c, e->score, e->type); if(rb == nil) return -1; + + /* + * Walk down to the new root block. + * We may stop early, but something is better than nothing. + */ + oe = *e; ob = nil; b = rb; -- cinap