Re: 8ee579abe09e - main - zfs: fall back if block_cloning feature is disabled
- In reply to: Rick Macklem : "Re: 8ee579abe09e - main - zfs: fall back if block_cloning feature is disabled"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Apr 2023 20:53:19 UTC
In message <CAM5tNy7Oh=ftiM6BToo0LRitF-w3EsX-WznjMqZptR1gWs9jvw@mail.gmail.c om> , Rick Macklem writes: > On Tue, Apr 4, 2023 at 12:31=E2=80=AFPM Cy Schubert <Cy.Schubert@cschubert.= > com> wrote: > > > > CAUTION: This email originated from outside of the University of Guelph. = > Do not click links or open attachments unless you recognize the sender and = > know the content is safe. If in doubt, forward suspicious emails to IThelp@= > uoguelph.ca > > > > > > On Tue, 4 Apr 2023 17:54:28 +0000 > > "Pokala, Ravi" <rpokala@panasas.com> wrote: > > > > > Cy, > > > > > > The patch adds 'bool done_outvp', unconditionally sets it to 'true', an= > d then later has a check for 'if (!done_outvp)'. Since there is no interven= > ing place where 'done_outvp' could be set to 'false', that check will never= > succeed and that branch is unreachable. > > > > It's set to false at line 6454, in the loop locking vnodes. > > > > > > > > Or am I mis-reading something? > > > > Maybe Rick can explain but all we're doing is ensuring that the first > > part of the loop is executed only first time through. We could invert it > > and save setting it to false every loop. > Yep. All I did was copy the first lines in the loop up to before the loop > so that it would be done once to lock outvp before the check on it. > The bool just avoids doing those lines for the first loop iteration. > > And, yes, you could reorganize the loop to avoid using the bool > to skip the lines on the first iteration, but I think the code would be > more confusing with the loop reorganized. > However, if someone wants to re-write it, I have no problem with that. Agreed. Having looked at refactoring it, what did result was more confusing with no meaningful saving of cycles spent. -- Cheers, Cy Schubert <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org e^(i*pi)+1=0